:root{
  --bg:#070707;
  --panel:#111;
  --gold:#d5ad4b;
  --gold2:#f2d27b;
  --text:#f4efe3;
  --muted:#a9a39a;
  --line:#3a2b12;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:radial-gradient(circle at 75% 10%,#18120a 0,#070707 42%);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  line-height:1.65;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
button,.btn{font:inherit;cursor:pointer}
hr{border:0;border-top:1px solid #292319;margin:22px 0}

.ltr-num{
  direction:ltr;
  unicode-bidi:isolate;
  display:inline-block;
  font-variant-numeric:tabular-nums;
}

/* Header & Brand Logo (black background preserved, zero cropping/recoloring) */
.topbar{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(7,7,7,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid #211a0e;
}
.topbar-inner{
  width:min(1260px,92%);
  margin:0 auto;
  padding:12px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.brand{
  display:inline-flex;
  gap:12px;
  align-items:center;
  flex:0 0 auto;
}
.brand-logo{
  display:block;
  height:54px;
  width:auto;
  max-width:160px;
  object-fit:contain;
  background:transparent;
  flex-shrink:0;
}
.brand-logo--portal{
  height:60px;
  max-width:180px;
}
.brand-logo--sm{
  height:44px;
  max-width:140px;
}
.brand-wordmark{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.brand-wordmark span{
  font-size:21px;
  letter-spacing:4px;
  color:var(--gold2);
  font-weight:800;
}
.brand-wordmark small{color:var(--muted);font-size:13px}

.topbar-controls{display:none}
.nav-toggle{
  min-width:44px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:19px;
}

.main-nav{
  display:flex;
  gap:18px;
  align-items:center;
}
.main-nav a{
  color:#ddd;
  padding:8px 10px;
  border-radius:8px;
  transition:color .18s,background .18s;
  font-size:15px;
}
.main-nav a:hover{
  color:var(--gold2);
  background:rgba(213,173,75,.08);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 22px;
  border:1px solid var(--gold);
  border-radius:10px;
  background:linear-gradient(135deg,#d7b35a,#9d7624);
  color:#0a0804;
  font-weight:800;
  transition:transform .16s,filter .16s,box-shadow .16s;
}
.btn:hover{filter:brightness(1.06);box-shadow:0 8px 24px rgba(213,173,75,.18)}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn.outline,.ghost{
  background:transparent;
  color:var(--gold2);
  border:1px solid #6b5325;
}
.btn.outline:hover,.ghost:hover{
  border-color:var(--gold);
  background:rgba(213,173,75,.08);
}
.ghost{
  padding:8px 13px;
  border-radius:8px;
  transition:border-color .16s,background .16s;
}
.ghost:disabled{opacity:.55;cursor:not-allowed}

/* Hero Section */
.hero{
  width:min(1260px,92%);
  margin:0 auto;
  min-height:680px;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:36px;
  align-items:center;
  padding:56px 0 72px;
  overflow:hidden;
}
.eyebrow{
  font-size:12px;
  letter-spacing:3px;
  color:var(--gold);
  margin:0 0 12px;
  font-weight:700;
}
.hero h1{
  font-size:clamp(54px,8.5vw,106px);
  line-height:.84;
  margin:0 0 24px;
  letter-spacing:4px;
}
.hero h1 span{
  font-size:.34em;
  letter-spacing:7px;
  color:var(--gold2);
}
.lead{
  max-width:580px;
  color:#c6c0b6;
  font-size:19px;
  line-height:1.85;
  margin:0;
}
.actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:28px;
}
.hero-pillars{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:34px;
  max-width:580px;
}
.pillar{
  background:linear-gradient(145deg,#121212,#0b0b0b);
  border:1px solid #211a0e;
  border-radius:12px;
  padding:12px 14px;
  display:grid;
  gap:3px;
}
.pillar strong{
  color:var(--gold2);
  font-size:13px;
  letter-spacing:1px;
  direction:ltr;
  text-align:right;
}
.pillar span{color:var(--muted);font-size:12.5px}

/* 3D Sculpted Gold & Ceramic Crown Showcase */
.crown-stage{
  height:470px;
  position:relative;
  display:grid;
  place-items:center;
  perspective:1050px;
}
.crown-halo{
  position:absolute;
  width:360px;
  height:360px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(213,173,75,.2) 0%,rgba(213,173,75,.07) 44%,transparent 72%);
  pointer-events:none;
}
.crown{
  width:214px;
  height:262px;
  position:relative;
  transform-style:preserve-3d;
  animation:float 5s ease-in-out infinite,spin 14s linear infinite;
}
.crown-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  backface-visibility:visible;
  filter:drop-shadow(0 24px 36px rgba(0,0,0,.65));
}
.crown-layer--back{transform:translateZ(-15px)}
.crown-layer--depth-3{transform:translateZ(-8px);filter:none}
.crown-layer--depth-2{transform:translateZ(0px);filter:none}
.crown-layer--depth-1{transform:translateZ(8px);filter:none}
.crown-layer--front{transform:translateZ(15px)}
.crown-core{
  position:absolute;
  top:18%;
  bottom:26%;
  left:calc(50% - 15px);
  width:30px;
  border-radius:10px;
  transform:rotateY(90deg);
  background:linear-gradient(180deg,#f4efe3 0%,#f2d27b 35%,#d5ad4b 65%,#6b5325 100%);
  border:1px solid rgba(242,210,123,.45);
  box-shadow:0 0 24px rgba(213,173,75,.18);
  backface-visibility:visible;
}
.ring{
  position:absolute;
  width:320px;
  height:74px;
  border:1px solid rgba(213,173,75,.55);
  border-radius:50%;
  transform:rotateX(72deg) rotateZ(-8deg);
  box-shadow:0 0 42px rgba(213,173,75,.16),inset 0 0 18px rgba(242,210,123,.12);
  pointer-events:none;
}
.ring--outer{
  width:376px;
  height:92px;
  border-color:rgba(213,173,75,.26);
  transform:rotateX(72deg) rotateZ(12deg);
  box-shadow:none;
}
@keyframes spin{to{transform:rotateY(360deg)}}
@keyframes float{50%{translate:0 -12px}}

/* Content Sections & Cards */
.section{
  width:min(1260px,92%);
  margin:0 auto;
  padding:78px 0;
  border-top:1px solid #17130c;
}
.section-head{margin-bottom:30px}
.section h2{font-size:clamp(30px,4vw,42px);margin:0 0 8px}
.section-head>p:last-child{color:var(--muted);margin:0}

.grid,.price-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.card,.price-card,.panel{
  background:linear-gradient(145deg,#121212,#0b0b0b);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
}
.card,.price-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  position:relative;
  transition:border-color .18s,transform .18s;
}
.card:hover,.price-card:hover{
  border-color:#6b5325;
  transform:translateY(-2px);
}
.card-index{
  font-size:12px;
  letter-spacing:2px;
  color:var(--gold);
  font-weight:700;
  direction:ltr;
  text-align:right;
}
.card h3,.price-card h3{margin:0 0 8px;color:var(--gold2);font-size:20px}
.card p,.price-card p{color:#aaa;line-height:1.75;margin:0}
.price-card-foot{
  padding-top:14px;
  border-top:1px solid #292319;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.price{
  font-size:26px;
  color:var(--gold2);
  font-weight:800;
}

/* Portal & Auth */
.portal{min-height:520px}
.auth-shell{
  display:grid;
  gap:18px;
}
.auth-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:16px 22px;
  background:linear-gradient(120deg,#121212,#0b0b0b);
  border:1px solid var(--line);
  border-radius:16px;
}
.auth-banner-brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.auth-banner-brand h3{margin:0;color:var(--gold2);font-size:18px}
.auth-banner-brand p{margin:2px 0 0;color:var(--muted);font-size:14px}

.auth-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:start;
}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.panel-head h3{margin:0;color:var(--gold2);font-size:21px}
.panel h3{margin-top:0;color:var(--gold2)}

.field{display:grid;gap:7px;margin-bottom:14px}
.field label{color:#c8c0b0;font-size:14px;font-weight:600}
.field input,.field select,.field textarea{
  width:100%;
  padding:12px 14px;
  border-radius:9px;
  border:1px solid #3b301d;
  background:#080808;
  color:#fff;
  font:inherit;
  transition:border-color .16s,box-shadow .16s;
}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:none;
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(213,173,75,.15);
}
.field select option{background:#111;color:#fff}

.auth-sub{
  margin:14px 0 0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.notice{
  padding:13px 15px;
  border-radius:10px;
  background:#17130b;
  border:1px solid #4b3919;
  color:#e5d19d;
  margin-bottom:16px;
  line-height:1.65;
}
.muted{color:var(--muted)}
.danger{border-color:#693b31!important;color:#f0a18e!important;background:transparent!important}
.danger:hover{background:rgba(164,75,61,.12)!important}
.success{color:#a9dfb1}

/* Dashboard Shell & Tabs */
.dashboard{display:grid;gap:18px}
.dash-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}
.dash-head-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.dash-head-brand h3{margin:0;color:var(--gold2);font-size:22px}
.dash-head-brand .eyebrow{margin-bottom:4px}

.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:6px;
  background:#0b0b0b;
  border:1px solid #292319;
  border-radius:12px;
}
.tabs button{
  padding:10px 16px;
  border-radius:9px;
  border:1px solid transparent;
  background:transparent;
  color:#ddd;
  font-weight:600;
  transition:background .16s,color .16s,border-color .16s;
}
.tabs button:hover{
  color:var(--gold2);
  border-color:#4b3919;
}
.tabs button.active{
  background:linear-gradient(135deg,#d7b35a,#9d7624);
  color:#0a0804;
  border-color:var(--gold);
  font-weight:800;
}

/* Doctor Info Strip & Filter Toolbars */
.doctor-info-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:14px 18px;
  background:#111111;
  border:1px solid rgba(213,173,75,.28);
  border-radius:12px;
}
.doctor-info-item{
  display:grid;
  gap:2px;
}
.doctor-info-item span{
  color:var(--muted);
  font-size:12px;
}
.doctor-info-item strong{
  color:var(--text);
  font-size:14.5px;
}
.filter-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:16px;
}
.filter-bar input,.filter-bar select{
  flex:1 1 210px;
  padding:10px 13px;
  border-radius:9px;
  border:1px solid rgba(213,173,75,.28);
  background:#070707;
  color:var(--text);
  font:inherit;
}
.filter-bar input:focus,.filter-bar select:focus{
  outline:none;
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(213,173,75,.14);
}

/* KPI Strip */
.kpi-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.kpi-card{
  background:#111111;
  border:1px solid rgba(213,173,75,.22);
  border-radius:12px;
  padding:16px 18px;
  display:grid;
  gap:4px;
}
.kpi-card span{color:var(--muted);font-size:13px}
.kpi-card strong{color:var(--gold2);font-size:24px;font-weight:800}

/* Badges */
.status-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 11px;
  border-radius:8px;
  border:1px solid #4b3919;
  background:#17130b;
  color:#e5d19d;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.status-badge--success{
  border-color:#57966a;
  color:#c3efcb;
  background:rgba(87,150,106,.14);
}
.status-badge--danger{
  border-color:#a44b3d;
  color:#ffc1b5;
  background:rgba(164,75,61,.14);
}
.status-badge--gold{
  border-color:#8b6a2c;
  color:var(--gold2);
  background:#211a0b;
}

/* Progress Bar inside Cases */
.stage-progress{
  display:grid;
  gap:5px;
  min-width:96px;
}
.stage-track{
  height:6px;
  border-radius:99px;
  background:#211a0e;
  overflow:hidden;
}
.stage-fill{
  height:100%;
  background:linear-gradient(90deg,#9d7624,#f2d27b);
  border-radius:99px;
}

/* Tables & Responsive Card-Tables */
.table-wrap{
  overflow-x:auto;
  border:1px solid #292319;
  border-radius:12px;
  background:#0b0b0b;
}
.table{
  width:100%;
  border-collapse:collapse;
}
.table th,.table td{
  padding:13px 14px;
  border-bottom:1px solid #211a0e;
  text-align:right;
  vertical-align:middle;
}
.table thead th{
  background:#121212;
  color:#e5d19d;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.table tbody tr:last-child td{border-bottom:0}
.table tbody tr:hover{background:rgba(213,173,75,.03)}
.cell-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* Invoice Document & Modal Sheet (fixes squeezed layout, shrinking logos & RTL/LTR alignment) */
.invoice-table th,.invoice-table td{white-space:nowrap}
.invoice-sheet{
  width:min(100%,680px);
  max-height:90vh;
  overflow:auto;
  background:#121212;
  color:#f7f0df;
  border:1px solid #b89448;
  border-radius:16px;
  padding:24px;
  box-shadow:0 24px 80px rgba(0,0,0,.75);
  display:grid;
  gap:18px;
}
.invoice-doc-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:16px;
  border-bottom:1px solid #3a2b12;
}
.invoice-brand-box{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}
.invoice-brand-logo{
  display:block;
  height:76px;
  width:auto;
  max-width:220px;
  object-fit:contain;
  background:transparent;
  flex-shrink:0;
}
.invoice-doc-title{text-align:left}
.invoice-doc-title h3{margin:0;color:var(--gold2);font-size:20px}
.invoice-doc-title p{margin:3px 0 0;color:var(--muted);font-size:13px}
.invoice-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.invoice-meta-item{
  background:#090909;
  border:1px solid #292319;
  border-radius:10px;
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.invoice-meta-item span{color:var(--muted);font-size:13px}
.invoice-meta-item strong{color:#f7f0df;font-size:15px}
.invoice-total-box{
  background:linear-gradient(120deg,#211a0b,#101010);
  border:1px solid #8b6a2c;
  border-radius:12px;
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.invoice-total-box span{color:#e5d19d;font-weight:700}
.invoice-total-box strong{color:var(--gold2);font-size:26px;font-weight:800}

/* Admin Doctor Account Statement Modal */
.statement-sheet{
  width:min(100%,920px);
  max-height:92vh;
  overflow:auto;
  background:#121212;
  color:#f7f0df;
  border:1px solid #b89448;
  border-radius:16px;
  padding:24px;
  box-shadow:0 24px 80px rgba(0,0,0,.78);
  display:grid;
  gap:16px;
}
.statement-range-bar{
  display:grid;
  grid-template-columns:1fr 1fr auto auto;
  gap:12px;
  align-items:end;
  padding:14px 16px;
  background:#090909;
  border:1px solid #3a2b12;
  border-radius:12px;
}
.statement-range-bar .field{margin:0}
.statement-range-bar .field input[type="date"]{
  min-height:44px;
  color-scheme:dark;
}
.statement-range-bar button{min-height:44px}
.statement-totals-bar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.statement-total-card{
  background:linear-gradient(120deg,#211a0b,#101010);
  border:1px solid #8b6a2c;
  border-radius:12px;
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:6px;
}
.statement-total-card--paid{
  background:linear-gradient(120deg,rgba(87,150,106,.16),#101010);
  border-color:#57966a;
}
.statement-total-card--due{
  background:linear-gradient(120deg,rgba(164,75,61,.16),#101010);
  border-color:#a44b3d;
}
.statement-total-card span{color:#e5d19d;font-weight:700;font-size:13.5px}
.statement-total-card strong{color:var(--gold2);font-size:20px;font-weight:800}
.statement-total-card--paid strong{color:#c3efcb}
.statement-total-card--due strong{color:#ffc1b5}

/* Admin Cases Structured Cards */
.admin-case-list{
  display:grid;
  gap:16px;
}
.admin-case-card{
  background:#0d0d0d;
  border:1px solid #3a2b12;
  border-radius:14px;
  padding:20px;
  display:grid;
  gap:16px;
}
.admin-case-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  padding-bottom:14px;
  border-bottom:1px solid #211a0e;
}
.admin-case-doctor h4{margin:0;color:var(--gold2);font-size:18px}
.admin-case-doctor p{margin:3px 0 0;color:var(--muted);font-size:13.5px}
.admin-case-badges{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.admin-case-meta{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.meta-pill{
  background:#080808;
  border:1px solid #211a0e;
  border-radius:9px;
  padding:10px 12px;
  display:grid;
  gap:3px;
}
.meta-pill span{color:var(--muted);font-size:12px}
.meta-pill strong{color:#f4efe3;font-size:14px;word-break:break-word}
.admin-case-body{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.admin-case-notes,.admin-case-files{
  background:#080808;
  border:1px solid #211a0e;
  border-radius:10px;
  padding:14px;
}
.admin-case-notes h5,.admin-case-files h5{
  margin:0 0 8px;
  color:#e5d19d;
  font-size:13px;
}
.admin-case-notes p{
  margin:0;
  color:#c6c0b6;
  white-space:pre-wrap;
  line-height:1.65;
}
.case-thumb-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.case-thumb-card{
  background:#121212;
  border:1px solid #292319;
  border-radius:10px;
  padding:8px;
  width:136px;
}
.case-thumb-btn{
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:#171717;
  border-radius:8px;
  cursor:zoom-in;
  overflow:hidden;
}
.case-thumb-btn img{
  width:100%;
  height:96px;
  object-fit:contain;
  display:block;
}
.case-file-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border:1px solid #3a2b12;
  border-radius:8px;
  background:#121212;
  color:var(--gold2);
  font-size:13px;
}
.case-file-link:hover{border-color:var(--gold)}
.admin-case-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding-top:12px;
  border-top:1px solid #211a0e;
}
.stage-control-group{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.stage-control-group .field{margin:0;min-width:220px}

/* Case Form & Price Quote */
.case-editor{max-width:1040px;margin-inline:auto}
.case-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.case-form-full{grid-column:1 / -1}
.case-editor .field select{min-height:46px}

.price-quote{
  padding:14px 16px;
  border:1px solid #8b6a2c;
  border-radius:12px;
  background:linear-gradient(120deg,#211a0b,#101010);
  color:var(--gold2);
  font-weight:800;
  line-height:1.7;
}

/* Reference-Matched Crown-Only 32-Tooth FDI Odontogram */
.tooth-legend{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  color:var(--gold2);
  font-size:13px;
  margin:4px 0 8px;
}
.tooth-chart{
  border:1px solid rgba(213,173,75,.3);
  background:#070707;
  padding:18px 14px;
  border-radius:14px;
  overflow-x:auto;
}
.odon-side-labels{
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-width:650px;
  color:var(--muted);
  font-size:11.5px;
  font-weight:700;
  margin-bottom:8px;
  direction:ltr;
}
.odon-grid{
  min-width:650px;
  direction:ltr;
  display:grid;
  gap:0;
}
.tooth-row{
  display:grid;
  grid-template-columns:repeat(8,minmax(34px,1fr)) 16px repeat(8,minmax(34px,1fr));
  gap:2px;
  align-items:end;
}
.tooth-row--upper{padding-bottom:8px}
.tooth-row--lower{
  padding-top:8px;
  align-items:start;
}
.tooth-midline{
  width:1px;
  height:calc(100% + 8px);
  min-height:82px;
  margin:0 auto;
  background:rgba(213,173,75,.52);
}
.tooth-row--upper .tooth-midline{margin-bottom:-8px}
.tooth-row--lower .tooth-midline{margin-top:-8px}
.odon-horiz-axis{
  height:1px;
  width:100%;
  background:rgba(213,173,75,.52);
}
.tooth{
  padding:6px 2px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  transition:background .16s,border-color .16s,transform .16s,box-shadow .16s;
}
.tooth-row--upper .tooth{flex-direction:column}
.tooth-row--lower .tooth{flex-direction:column-reverse}
.tooth:hover{
  background:#111111;
  border-color:rgba(213,173,75,.45);
  color:var(--text);
}
.odon-svg{
  width:100%;
  max-width:38px;
  height:46px;
  display:block;
}
.odon-crown-fill{
  fill:rgba(244,239,227,.08);
  transition:fill .16s;
}
.odon-crown-stroke{
  stroke:var(--muted);
  stroke-width:1.45;
  stroke-linejoin:round;
  transition:stroke .16s;
}
.odon-crown-detail{
  stroke:var(--muted);
  stroke-width:.95;
  stroke-linecap:round;
  opacity:.72;
  transition:stroke .16s,opacity .16s;
}
.tooth:hover .odon-crown-fill{fill:rgba(244,239,227,.14)}
.tooth:hover .odon-crown-stroke,.tooth:hover .odon-crown-detail{stroke:var(--text)}
.tooth small{
  font-size:12px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  line-height:1;
  color:inherit;
}
.tooth.selected{
  background:rgba(213,173,75,.15);
  border-color:var(--gold);
  box-shadow:inset 0 0 14px rgba(213,173,75,.16);
  color:var(--gold2);
}
.tooth.selected .odon-crown-fill{fill:rgba(213,173,75,.34)}
.tooth.selected .odon-crown-stroke{stroke:var(--gold2);stroke-width:1.8}
.tooth.selected .odon-crown-detail{stroke:var(--gold2);opacity:.92}
.tooth.selected small{color:var(--gold2);font-weight:800}
.tooth-summary-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
}
.selected-teeth{
  color:var(--gold2);
  font-weight:700;
  margin:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.tooth-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 9px;
  border-radius:7px;
  background:#211a0b;
  border:1px solid #8b6a2c;
  color:var(--gold2);
  font-size:12.5px;
  direction:ltr;
  font-variant-numeric:tabular-nums;
}

.file-dropzone{
  border:1px dashed #66552f;
  border-radius:12px;
  background:#080808;
  padding:14px;
  display:grid;
  gap:8px;
}
.file-dropzone input[type="file"]{
  border:0;
  padding:6px 0;
  background:transparent;
}

#pricingForm .actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:0;
  grid-column:1 / -1;
}
#pricingForm .actions .btn,#pricingForm .actions .ghost{min-height:44px}

/* Modals (Service edit, Centered Alerts/Prompts, Lightbox, Invoice Sheet) */
.service-edit-overlay,.smilix-modal-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.8);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  backdrop-filter:blur(6px);
}
.service-edit-card,.smilix-modal-card{
  width:min(100%,480px);
  max-height:90vh;
  overflow:auto;
  background:#151515;
  color:#f7f0df;
  border:1px solid #b89448;
  border-radius:16px;
  padding:24px;
  box-shadow:0 20px 70px rgba(0,0,0,.65);
  display:grid;
  gap:12px;
}
.service-edit-card h3,.smilix-modal-card h3{margin:0;color:#d8b86a}
.service-edit-card label,.smilix-modal-card label{font-size:14px;color:#e4d6b0}
.service-edit-card input,.service-edit-card select,.service-edit-card textarea,
.smilix-modal-card input,.smilix-modal-card select,.smilix-modal-card textarea{
  width:100%;
  box-sizing:border-box;
  background:#090909;
  color:#fff;
  border:1px solid #66552f;
  border-radius:8px;
  padding:11px;
  font:inherit;
}
.service-edit-card textarea{resize:vertical}
.service-edit-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}
.service-edit-actions button{flex:1;min-width:120px}

.lightbox-overlay{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(0,0,0,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.lightbox-close{
  position:absolute;
  top:16px;
  right:18px;
  width:44px;
  height:44px;
  border:1px solid #6b5325;
  border-radius:50%;
  background:#111;
  color:var(--gold2);
  font-size:28px;
  line-height:1;
}
.lightbox-img{
  max-width:min(94vw,1200px);
  max-height:88vh;
  object-fit:contain;
  border-radius:10px;
  box-shadow:0 10px 50px rgba(0,0,0,.6);
}

/* Centered Operation Notification + Subtle Rotating Dental Tooth Spinner */
.smilix-operation{
  position:fixed;
  z-index:10050;
  top:20px;
  left:50%;
  transform:translate(-50%,-18px);
  width:min(92vw,460px);
  min-height:58px;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  border:1px solid #8b6a2c;
  border-radius:14px;
  background:rgba(17,15,10,.97);
  color:#f2d27b;
  box-shadow:0 18px 50px rgba(0,0,0,.65);
  font-weight:700;
  text-align:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s,transform .22s;
}
.smilix-operation.visible{opacity:1;transform:translate(-50%,0)}
.smilix-operation.success{border-color:#57966a;color:#c3efcb}
.smilix-operation.error{border-color:#a44b3d;color:#ffc1b5}
.smilix-spinner{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--gold2);
  animation:smilixToothSpin 1.8s linear infinite;
  flex:0 0 auto;
}
.smilix-spinner svg{width:22px;height:22px;display:block}
.smilix-operation-check{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid currentColor;
  border-radius:50%;
  font-size:14px;
  flex:0 0 auto;
}
@keyframes smilixToothSpin{to{transform:rotate(360deg)}}

/* Footer */
.site-footer{
  padding:32px 0;
  border-top:1px solid #17130c;
  color:#999;
}
.footer-inner{
  width:min(1260px,92%);
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.footer-title{color:var(--gold2);font-weight:700}
.footer-contact{display:flex;align-items:center;gap:8px}
.footer-contact a{color:var(--gold2);font-weight:700}

/* Responsive Breakpoints */
@media(max-width:980px){
  .admin-case-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .admin-case-body{grid-template-columns:1fr}
  .grid,.price-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:800px){
  .topbar-controls{display:flex;align-items:center}
  .main-nav{
    display:none;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding-top:10px;
    border-top:1px solid #211a0e;
  }
  .main-nav.open{display:flex}
  .main-nav a{
    display:block;
    padding:10px 12px;
    background:#0d0d0d;
    border:1px solid #211a0e;
  }
  .hero{
    grid-template-columns:1fr;
    padding:36px 0 54px;
    min-height:auto;
  }
  .crown-stage{height:330px;order:-1}
  .crown{width:170px;height:212px}
  .ring{width:260px;height:58px}
  .hero h1{font-size:62px}
  .lead{font-size:17px}
  .hero-pillars{grid-template-columns:1fr}
  .grid,.price-grid,.auth-grid,.kpi-strip,.doctor-info-strip,.case-form-grid,.invoice-meta-grid,.statement-range-bar,.statement-totals-bar{
    grid-template-columns:1fr;
  }
  .section{padding:56px 0}
  .tabs{flex-wrap:nowrap;overflow-x:auto}
  .tabs button{flex:0 0 auto}

  /* Responsive Card-Tables on Mobile */
  .table-wrap--cards{border:0;background:transparent;overflow:visible}
  .table--cards thead{display:none}
  .table--cards tbody{display:grid;gap:12px}
  .table--cards tr{
    display:grid;
    gap:8px;
    background:#121212;
    border:1px solid #3a2b12;
    border-radius:12px;
    padding:14px;
  }
  .table--cards td{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:6px 0;
    border-bottom:1px solid #211a0e;
    text-align:left;
    white-space:normal;
  }
  .table--cards td:last-child{border-bottom:0;padding-bottom:0}
  .table--cards td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:12.5px;
    font-weight:700;
    text-align:right;
    flex:0 0 auto;
  }
}

@media(max-width:600px){
  .brand-logo{height:44px}
  .brand-logo--portal{height:50px}
  .invoice-brand-logo{height:62px}
  .tooth-chart{padding:12px 8px}
  .odon-svg{max-width:30px;height:35px}
  .tooth small{font-size:11px}
}

@media(prefers-reduced-motion:reduce){
  .crown,.smilix-spinner{animation:none}
}

@media print{
  body{background:#070707;color:#f4efe3}
  .topbar,.site-footer,#home,#services,#prices,.section-head,.dash-head,.tabs,.no-print{display:none!important}
  .smilix-modal-overlay{position:static;background:transparent;padding:0}
  .invoice-sheet,.statement-sheet{border:1px solid #8b6a2c;box-shadow:none;max-height:none;width:100%}
}
