:root{
  --bg:#f6f4f1;
  --card:#ffffff;
  --ink:#1f2933;
  --muted:#6b7280;
  --line:#e8e3dc;
  --accent:#7a4f43;
  --accent-2:#ad7867;
  --soft:#efe7e2;
  --success:#1e7a4a;
  --danger:#b53b3b;
  --shadow:0 16px 50px rgba(31,41,51,.08);
  --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
code{background:#f2eee9;padding:3px 7px;border-radius:7px}
small{color:var(--muted)}
.lp-wrap{width:min(1160px,calc(100% - 36px));margin:auto}
.brand{display:flex;align-items:center;gap:10px}
.brand-mark{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:white;font-weight:800}
.brand span:last-child{display:flex;flex-direction:column;line-height:1.1}
.brand small{font-size:11px;margin-top:4px;letter-spacing:.06em}
.btn{border:0;border-radius:12px;padding:11px 16px;cursor:pointer;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn-primary{background:var(--accent);color:white}
.btn-primary:hover{background:#684138}
.btn-secondary{background:white;border:1px solid var(--line)}
.btn-ghost{background:transparent;color:inherit;border:1px solid rgba(255,255,255,.18)}
.btn-lg{padding:14px 20px}
.full{width:100%}
.lp-nav{position:sticky;top:0;z-index:10;background:rgba(246,244,241,.92);backdrop-filter:blur(12px);border-bottom:1px solid rgba(122,79,67,.08)}
.nav-inner{height:76px;display:flex;justify-content:space-between;align-items:center}
.hero{padding:76px 0 68px;background:radial-gradient(circle at 80% 25%,#eadbd2 0,transparent 33%)}
.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:56px;align-items:center}
.eyebrow{font-size:12px;font-weight:800;letter-spacing:.16em;color:var(--accent-2)}
h1,h2,h3{margin-top:0}
.hero h1{font-family:Georgia,serif;font-size:clamp(45px,6vw,78px);line-height:1.02;margin:16px 0 24px;font-weight:500;letter-spacing:-.04em}
.hero h1 em{color:var(--accent);font-style:normal}
.lead{font-size:19px;line-height:1.7;color:#4a5560;max-width:700px}
.hero-actions{display:flex;gap:12px;margin:28px 0}
.trust-row{display:flex;gap:18px;flex-wrap:wrap;color:#5b625f;font-size:14px}
.doctor-card{background:white;border-radius:36px;padding:16px;box-shadow:var(--shadow);transform:rotate(1.4deg)}
.doctor-card img{width:100%;display:block;border-radius:28px;background:#eadbd2;aspect-ratio:4/5;object-fit:cover}
.doctor-caption{display:flex;justify-content:space-between;align-items:center;padding:18px 12px 8px}
.doctor-caption span{color:var(--muted);font-size:13px}
.section{padding:86px 0}
.section.soft{background:#eee7e2}
.section-head{max-width:720px;margin-bottom:34px}
.section-head h2,.split h2{font-family:Georgia,serif;font-weight:500;font-size:clamp(32px,4vw,52px);line-height:1.12;margin:10px 0}
.cards{display:grid;gap:18px}
.cards.six{grid-template-columns:repeat(3,1fr)}
.cards.three{grid-template-columns:repeat(3,1fr)}
.info-card,.media-card{background:white;border:1px solid var(--line);padding:26px;border-radius:var(--radius);min-height:180px}
.info-card p,.media-card p{color:var(--muted);line-height:1.6}
.icon-dot{width:12px;height:12px;border-radius:50%;background:var(--accent);margin-bottom:24px}
.media-card span{font-family:Georgia,serif;font-size:42px;color:#d0b3a7}
.split{display:grid;grid-template-columns:1fr 1fr;gap:70px}
.steps{display:grid;gap:12px}
.steps>div{display:flex;gap:18px;background:rgba(255,255,255,.56);padding:18px;border-radius:16px}
.steps b{font-family:Georgia,serif;font-size:28px;color:var(--accent)}
.steps span{display:flex;flex-direction:column;gap:5px}
.booking-section{padding:90px 0;background:#2f2825;color:white}
.booking-grid{display:grid;grid-template-columns:1fr .9fr;gap:70px;align-items:start}
.booking-grid h2{font-family:Georgia,serif;font-size:48px;font-weight:500}
.booking-grid p{color:#d7cbc5;line-height:1.7}
.booking-card{background:white;color:var(--ink);padding:28px;border-radius:26px;display:grid;gap:14px}
label{display:grid;gap:7px;font-size:13px;font-weight:700}
input,select,textarea{width:100%;border:1px solid var(--line);background:white;border-radius:11px;padding:12px 13px;outline:none;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:#b78a7b;box-shadow:0 0 0 3px rgba(183,138,123,.13)}
.check{grid-template-columns:auto 1fr;align-items:start;font-weight:500;line-height:1.4}
.check input{width:auto;margin-top:3px}
.ref-note{font-size:13px;background:#f6f1ee;padding:10px;border-radius:10px}
.footer{background:#241f1d;color:white;padding:30px 0}
.footer-grid{display:flex;justify-content:space-between;align-items:center}
.footer p{color:#bcaea7;margin:4px 0}
.flash-stack{position:fixed;top:18px;right:18px;z-index:100;width:min(420px,calc(100% - 36px));display:grid;gap:8px}
.flash{padding:14px 16px;border-radius:12px;background:white;box-shadow:var(--shadow);border-left:4px solid var(--accent)}
.flash.success{border-left-color:var(--success)}
.flash.error{border-left-color:var(--danger)}
.center-page{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 50% 0,#efe0d7,transparent 44%)}
.auth-card,.success-card{width:min(480px,100%);background:white;padding:32px;border-radius:26px;box-shadow:var(--shadow)}
.auth-card{display:grid;gap:16px}
.auth-brand{margin-bottom:8px}
.auth-card h1,.success-card h1{font-family:Georgia,serif;font-weight:500;font-size:36px;margin:4px 0}
.auth-card p,.success-card p{color:var(--muted);line-height:1.6}
.muted-link{color:var(--muted);font-size:13px}
.success-card{text-align:center}
.success-icon{width:58px;height:58px;margin:auto auto 18px;border-radius:50%;display:grid;place-items:center;background:#e8f5ed;color:var(--success);font-size:28px}
.share-box{display:grid;gap:9px;background:#f5f1ee;border:1px solid var(--line);padding:18px;border-radius:16px;margin:20px 0;text-align:left}
.share-box strong{font-size:28px;letter-spacing:.1em}
.share-box.large{grid-template-columns:1fr auto;align-items:end;margin:0 0 22px}
.share-box.large span{grid-column:1/-1}
.admin-shell{display:grid;grid-template-columns:245px 1fr;min-height:100vh}
.sidebar{background:#272220;color:white;padding:24px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.sidebar .brand{padding:0 8px;margin-bottom:28px}
.sidebar nav{display:grid;gap:5px}
.sidebar nav a{padding:11px 12px;border-radius:10px;color:#dfd5d0}
.sidebar nav a:hover{background:rgba(255,255,255,.07);color:white}
.sidebar-logout{margin-top:auto}
.sidebar-logout .btn{width:100%}
.admin-main{padding:30px;min-width:0}
.page-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:24px}
.page-head h1{font-family:Georgia,serif;font-size:40px;font-weight:500;margin:6px 0 0}
.page-head p{color:var(--muted);margin:6px 0 0}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.metric-grid.compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.metric{background:white;border:1px solid var(--line);padding:18px;border-radius:17px;min-width:0}
.metric span{display:block;color:var(--muted);font-size:12px;margin-bottom:10px}
.metric strong{font-size:24px;line-height:1.15}
.admin-grid{display:grid;gap:18px;margin-bottom:18px}
.admin-grid.two{grid-template-columns:1fr 1fr}
.panel{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}
.panel-head h2{margin:0;font-size:18px}
.panel-head a{color:var(--accent);font-size:13px;font-weight:700}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:13px 16px;text-align:left;border-bottom:1px solid #eee9e5;white-space:nowrap}
th{font-size:11px;letter-spacing:.05em;color:var(--muted);text-transform:uppercase}
td small{display:block;margin-top:4px}
td a{color:var(--accent);font-weight:700}
.empty{text-align:center;color:var(--muted);padding:28px}
.status{display:inline-block;padding:5px 8px;border-radius:8px;background:#efefef;font-size:11px;font-weight:800}
.status.arrived,.status.completed,.status.approved,.status.paid{background:#e6f4eb;color:#18663e}
.status.pending,.status.booked,.status.confirmed{background:#fff5dc;color:#8a6615}
.status.cancelled,.status.no_show{background:#fdeaea;color:#9f2e2e}
.search-form,.filter-form{display:flex;gap:8px}
.search-form input{min-width:320px}
.detail-list{margin:0;padding:0 20px}
.detail-list>div{display:grid;grid-template-columns:150px 1fr;padding:13px 0;border-bottom:1px solid var(--line)}
.detail-list dt{color:var(--muted)}
.detail-list dd{margin:0}
.stack-form{padding:20px;display:grid;gap:13px}
.portal-shell{min-height:100vh}
.portal-head{display:flex;justify-content:space-between;align-items:center;background:white;border-bottom:1px solid var(--line);padding:15px max(20px,calc((100% - 1100px)/2))}
.portal-main{width:min(1100px,calc(100% - 36px));margin:30px auto 70px}
@media(max-width:1000px){
  .hero-grid,.booking-grid,.split,.admin-grid.two{grid-template-columns:1fr}
  .cards.six{grid-template-columns:repeat(2,1fr)}
  .metric-grid,.metric-grid.compact{grid-template-columns:repeat(2,1fr)}
  .admin-shell{grid-template-columns:1fr}
  .sidebar{height:auto;position:static}
  .sidebar nav{grid-template-columns:repeat(4,1fr)}
  .sidebar-logout{margin-top:16px}
}
@media(max-width:700px){
  .hero{padding-top:44px}
  .hero-grid{gap:30px}
  .hero h1{font-size:45px}
  .cards.six,.cards.three{grid-template-columns:1fr}
  .metric-grid,.metric-grid.compact{grid-template-columns:1fr 1fr}
  .admin-main{padding:18px}
  .page-head{align-items:stretch;flex-direction:column}
  .search-form{flex-direction:column}
  .search-form input{min-width:0}
  .sidebar nav{grid-template-columns:1fr 1fr}
  .booking-grid h2{font-size:38px}
  .share-box.large{grid-template-columns:1fr}
  .footer-grid{align-items:flex-start;gap:14px;flex-direction:column}
}

.wrap-cell{white-space:normal;min-width:260px;line-height:1.5}


/* ================================================================
   Dr. Thu Marketing V2 — Medical Luxury
   ================================================================ */
:root{
  --dt-ink:#17212b;
  --dt-muted:#66717c;
  --dt-warm:#8e5d4e;
  --dt-warm-dark:#74483b;
  --dt-blush:#eadbd3;
  --dt-cream:#f7f3ef;
  --dt-paper:#fffdfb;
  --dt-line:#e8e1dc;
  --dt-green:#446b61;
  --dt-shadow:0 24px 70px rgba(64,45,37,.10);
  --dt-radius:24px;
}
body{font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;letter-spacing:-.01em}
.marketing-page{background:var(--dt-paper);color:var(--dt-ink)}
.marketing-page h1,.marketing-page h2{font-family:"Playfair Display",Georgia,"Times New Roman",serif;letter-spacing:-.035em}
.site-shell{width:min(1180px,calc(100% - 40px));margin:0 auto}
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,253,251,.90);backdrop-filter:blur(18px);border-bottom:1px solid rgba(142,93,78,.08)}
.header-inner{height:78px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:32px}
.site-logo{display:flex;align-items:center;gap:11px;min-width:max-content}
.logo-monogram{width:44px;height:44px;border:1px solid rgba(142,93,78,.32);border-radius:50%;display:grid;place-items:center;color:var(--dt-warm);font-family:"Playfair Display",serif;font-size:18px;font-weight:700;background:#fff}
.logo-copy{display:flex;flex-direction:column;gap:2px;line-height:1.1}.logo-copy strong{font-family:"Playfair Display",serif;font-size:19px}.logo-copy small{font-size:8px;letter-spacing:.18em;color:#8a949d}
.main-nav{display:flex;justify-content:center;gap:28px}.main-nav a{font-size:13px;font-weight:600;color:#4f5963;position:relative}.main-nav a:after{content:"";position:absolute;left:0;right:100%;bottom:-8px;height:1px;background:var(--dt-warm);transition:.25s}.main-nav a:hover:after{right:0}
.header-actions{display:flex;align-items:center;gap:8px}.btn.compact{padding:10px 14px;font-size:12px;border-radius:10px}.btn-light{background:#fff;color:var(--dt-ink);border:1px solid var(--dt-line)}.btn-outline{background:transparent;color:var(--dt-warm-dark);border:1px solid rgba(142,93,78,.45)}.btn-xl{padding:15px 21px;border-radius:13px}.btn-white{background:#fff;color:var(--dt-warm-dark)}.btn-dark-outline{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.45)}
.hero-v2{position:relative;overflow:hidden;background:linear-gradient(135deg,#fbf8f5 0%,#f5ede8 57%,#efe1d8 100%);padding:66px 0 58px}.hero-v2:before{content:"";position:absolute;width:520px;height:520px;border-radius:50%;background:rgba(255,255,255,.58);right:-120px;top:-160px}.hero-v2-grid{display:grid;grid-template-columns:1.02fr .98fr;align-items:center;gap:60px;position:relative;z-index:1}.kicker{display:inline-block;color:#a66f5e;font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}.hero-v2 h1{font-size:clamp(48px,5.5vw,75px);line-height:1.02;font-weight:600;margin:16px 0 22px;max-width:650px}.hero-v2 h1 em,.approach-intro h2 em{color:var(--dt-warm);font-style:italic}.hero-intro{font-size:17px;line-height:1.8;color:#56616c;max-width:620px}.hero-cta-row{display:flex;gap:12px;margin:30px 0 36px}.hero-principles{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.hero-principles div{border-top:1px solid rgba(142,93,78,.20);padding-top:13px;display:grid;gap:5px}.hero-principles span{font-size:10px;color:#a66f5e;font-weight:800}.hero-principles strong{font-size:12px;line-height:1.45;font-weight:700}
.hero-visual-wrap{position:relative;min-height:520px}.hero-visual{position:absolute;inset:10px 50px 10px 45px;border-radius:48% 48% 28% 28%;overflow:hidden;background:#e5d4ca;box-shadow:var(--dt-shadow)}.hero-visual img{width:100%;height:100%;object-fit:cover;object-position:center top;display:block}.hero-visual:after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(42,31,27,.28),transparent 33%)}.hero-signature{position:absolute;left:28px;bottom:24px;z-index:2;color:white;display:flex;flex-direction:column}.hero-signature span{font-family:"Playfair Display",serif;font-size:27px}.hero-signature small{font-size:10px;letter-spacing:.06em;color:rgba(255,255,255,.82)}.hero-mini-card{position:absolute;z-index:4;background:#fff;padding:9px;border-radius:16px;box-shadow:0 18px 45px rgba(47,33,27,.14);display:flex;align-items:center;gap:10px;width:215px}.hero-mini-card img{width:64px;height:64px;border-radius:12px;object-fit:cover}.hero-mini-card span{display:flex;flex-direction:column;gap:3px}.hero-mini-card strong{font-size:11px}.hero-mini-card small{font-size:9px;line-height:1.35}.mini-card-one{right:0;top:58px}.mini-card-two{left:0;bottom:50px}
.trust-strip{background:#fff;border-top:1px solid #efe8e3;border-bottom:1px solid #efe8e3}.trust-grid{display:grid;grid-template-columns:repeat(4,1fr)}.trust-grid>div{padding:24px 22px;display:grid;grid-template-columns:auto 1fr;column-gap:12px;border-right:1px solid #eee8e4}.trust-grid>div:last-child{border-right:0}.trust-icon{grid-row:1/3;font-size:24px;color:var(--dt-warm)}.trust-grid strong{font-size:12px}.trust-grid small{font-size:10px;margin-top:4px;line-height:1.4}
.marketing-section{padding:92px 0}.section-title-row{display:flex;justify-content:space-between;align-items:end;gap:40px;margin-bottom:34px}.section-title-row>div{max-width:720px}.section-title-row h2{font-size:clamp(34px,4.2vw,52px);line-height:1.1;margin:10px 0 10px}.section-title-row p{color:var(--dt-muted);line-height:1.7;margin:0}.text-link{font-size:12px;font-weight:800;color:var(--dt-warm);white-space:nowrap}.text-link span{margin-left:5px}.solution-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.solution-card{border:1px solid var(--dt-line);border-radius:20px;overflow:hidden;background:#fff;transition:.25s;box-shadow:0 6px 24px rgba(40,30,25,.03)}.solution-card:hover{transform:translateY(-4px);box-shadow:0 18px 48px rgba(40,30,25,.08)}.solution-image{height:175px;overflow:hidden;background:#eee}.solution-image img{width:100%;height:100%;object-fit:cover;transition:.35s}.solution-card:hover img{transform:scale(1.025)}.solution-body{padding:19px 20px 20px}.solution-body h3{font-size:16px;margin:0 0 7px}.solution-body p{font-size:12px;color:var(--dt-muted);line-height:1.6;margin:0 0 14px;min-height:58px}.solution-body a{font-size:11px;color:var(--dt-warm);font-weight:800}
.approach-section{background:#f5efeb}.approach-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:80px;align-items:center}.approach-intro h2{font-size:clamp(38px,4.5vw,58px);line-height:1.07;margin:14px 0 20px}.approach-intro p{color:var(--dt-muted);line-height:1.8;margin-bottom:28px}.process-list{display:grid;gap:11px}.process-list article{display:grid;grid-template-columns:60px 1fr;align-items:center;gap:20px;background:rgba(255,255,255,.72);border:1px solid rgba(255,255,255,.88);border-radius:18px;padding:20px}.process-number{font-family:"Playfair Display",serif;font-size:25px;color:var(--dt-warm);border-right:1px solid #dfd4cd}.process-list h3{font-size:14px;margin:0 0 6px}.process-list p{font-size:11px;color:var(--dt-muted);margin:0;line-height:1.55}
.compact-title{align-items:start}.gallery-note{font-size:11px!important;max-width:380px;line-height:1.6!important}.editorial-gallery{display:grid;grid-template-columns:1.5fr .75fr .75fr;grid-template-rows:235px 235px;gap:14px}.editorial-gallery figure{margin:0;border-radius:20px;overflow:hidden;position:relative;background:#e9e1dc}.editorial-gallery figure:nth-child(4){grid-column:2/4}.editorial-gallery .gallery-large{grid-row:1/3}.editorial-gallery img{width:100%;height:100%;object-fit:cover;display:block;transition:.4s}.editorial-gallery figure:hover img{transform:scale(1.025)}.editorial-gallery figcaption{position:absolute;left:14px;bottom:14px;background:rgba(255,255,255,.90);backdrop-filter:blur(8px);border-radius:999px;padding:7px 10px;font-size:9px;font-weight:700}
.knowledge-section{background:#fff}.knowledge-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px}.knowledge-feature{border:1px solid var(--dt-line);border-radius:24px;overflow:hidden;display:grid;grid-template-columns:.9fr 1.1fr;min-height:330px}.knowledge-visual img{width:100%;height:100%;object-fit:cover}.knowledge-feature>div:last-child{padding:35px}.knowledge-feature span{font-size:9px;letter-spacing:.15em;font-weight:800;color:var(--dt-warm)}.knowledge-feature h3{font-family:"Playfair Display",serif;font-size:31px;line-height:1.15;margin:14px 0}.knowledge-feature p{font-size:12px;line-height:1.7;color:var(--dt-muted)}.knowledge-feature a{display:inline-block;margin-top:12px;color:var(--dt-warm);font-weight:800;font-size:11px}.knowledge-list{display:grid;gap:10px}.knowledge-list article{border:1px solid var(--dt-line);border-radius:18px;padding:20px;display:grid;grid-template-columns:38px 1fr;gap:14px}.knowledge-list>article>span{font-family:"Playfair Display",serif;color:#b18778}.knowledge-list h3{font-size:13px;margin:0 0 6px}.knowledge-list p{font-size:11px;color:var(--dt-muted);line-height:1.55;margin:0}
.affiliate-band{background:linear-gradient(120deg,#845142,#a97665);color:#fff;padding:62px 0}.affiliate-band-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:55px;align-items:center}.light-kicker{color:#f1d9cf}.affiliate-band h2{font-family:"Playfair Display",serif;font-size:39px;line-height:1.12;margin:10px 0 13px}.affiliate-band p{color:rgba(255,255,255,.78);line-height:1.7;margin:0}.affiliate-band-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.booking-v2-section{background:#faf7f4}.booking-v2-grid{display:grid;grid-template-columns:.92fr 1.08fr;gap:80px;align-items:start}.booking-copy h2{font-size:clamp(38px,4.4vw,56px);line-height:1.08;margin:12px 0 18px}.booking-copy>p{color:var(--dt-muted);line-height:1.75}.booking-benefits{display:grid;gap:13px;margin-top:30px}.booking-benefits>div{display:grid;grid-template-columns:34px 1fr;gap:12px}.booking-benefits b{font-family:"Playfair Display",serif;color:var(--dt-warm)}.booking-benefits span{display:flex;flex-direction:column}.booking-benefits strong{font-size:12px}.booking-benefits small{font-size:10px;margin-top:4px;line-height:1.4}.booking-card-v2{background:#fff;border:1px solid var(--dt-line);padding:28px;border-radius:24px;box-shadow:var(--dt-shadow);display:grid;gap:15px}.form-title{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px solid #eee6e1;padding-bottom:16px;margin-bottom:2px}.form-title span{font-family:"Playfair Display",serif;font-size:25px;font-weight:700}.form-title small{font-size:9px}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.booking-card-v2 label,.member-auth-card label{font-size:10px;color:#45505a}.booking-card-v2 input,.booking-card-v2 select,.member-auth-card input{padding:13px 14px;border-radius:11px;background:#fcfbfa;border-color:#e5ddd7}.check-v2{font-weight:500!important;line-height:1.5}.ref-badge{background:#edf6f1;color:#32634e;padding:10px 12px;border-radius:10px;font-size:10px}
.site-footer{background:#20262b;color:#fff;padding-top:58px}.footer-main{display:grid;grid-template-columns:1.3fr .6fr .7fr 1fr;gap:45px;padding-bottom:42px}.footer-logo .logo-monogram{background:transparent;color:#e8c7bb;border-color:#705c55}.footer-logo .logo-copy small{color:#9aa3aa}.footer-brand p,.site-footer a,.footer-note{color:#aeb6bc;font-size:11px;line-height:1.7}.site-footer h4{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#f0e6e1;margin:0 0 16px}.site-footer>div>div:not(.footer-brand){display:flex;flex-direction:column;gap:9px}.footer-bottom{border-top:1px solid #333b40;display:flex;justify-content:space-between;padding:18px 0 22px;color:#7f898f;font-size:9px}
/* Member authentication */
.member-auth-page{min-height:100vh;background:#f4ece7;font-family:"Inter",sans-serif}.member-auth-shell{min-height:100vh;position:relative;background:radial-gradient(circle at 15% 20%,rgba(255,255,255,.22),transparent 28%),linear-gradient(115deg,#7e4e40 0,#9f6c5b 44%,#f6f0ec 44%,#fff 100%);padding:28px}.auth-logo{position:absolute;left:38px;top:30px;z-index:2;color:#fff}.auth-logo .logo-monogram{background:#fff}.auth-logo .logo-copy small{color:#eadfd9}.member-auth-grid{width:min(1100px,100%);min-height:calc(100vh - 56px);margin:auto;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:110px}.member-auth-story{color:#fff;padding:80px 0 20px}.member-auth-story h1{font-family:"Playfair Display",serif;font-size:52px;line-height:1.06;margin:14px 0 20px}.member-auth-story h1 em{color:#f2d6ca}.member-auth-story p{color:rgba(255,255,255,.78);line-height:1.75;max-width:480px}.auth-points{display:flex;flex-wrap:wrap;gap:8px;margin-top:26px}.auth-points div{border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:8px 11px;font-size:10px;color:#f5eae5}.member-auth-card{background:#fff;border:1px solid #eee4de;border-radius:26px;padding:34px;box-shadow:0 30px 80px rgba(59,42,34,.16);display:grid;gap:16px}.member-auth-card h2{font-family:"Playfair Display",serif;font-size:35px;margin:8px 0}.member-auth-card>div>p{font-size:11px;color:var(--dt-muted);line-height:1.6}.auth-switch{text-align:center;font-size:11px;color:#6a737b}.auth-switch a{color:var(--dt-warm);font-weight:800}.auth-hint{font-size:9px!important;line-height:1.5;text-align:center}
@media(max-width:1050px){.main-nav{display:none}.header-inner{grid-template-columns:auto 1fr}.header-actions{justify-self:end}.hero-v2-grid,.approach-grid,.booking-v2-grid{grid-template-columns:1fr;gap:45px}.hero-v2-copy{max-width:760px}.hero-visual-wrap{min-height:560px;max-width:650px;width:100%;margin:auto}.trust-grid{grid-template-columns:1fr 1fr}.trust-grid>div:nth-child(2){border-right:0}.solution-grid{grid-template-columns:1fr 1fr}.affiliate-band-grid{grid-template-columns:1fr}.affiliate-band-actions{justify-content:flex-start}.knowledge-grid{grid-template-columns:1fr}.member-auth-grid{gap:55px}.footer-main{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.site-shell{width:min(100% - 28px,1180px)}.site-header{position:relative}.header-inner{height:70px;gap:10px}.logo-monogram{width:38px;height:38px}.logo-copy strong{font-size:17px}.logo-copy small{font-size:6.5px}.header-actions{gap:5px}.header-actions .btn.compact{padding:9px 10px;font-size:10px}.hide-mobile{display:none}.hero-v2{padding:45px 0}.hero-v2 h1{font-size:44px}.hero-intro{font-size:14px}.hero-cta-row{flex-direction:column}.hero-cta-row .btn{width:100%}.hero-principles{grid-template-columns:1fr}.hero-visual-wrap{min-height:430px}.hero-visual{inset:0 18px 0 18px}.hero-mini-card{width:175px}.hero-mini-card img{width:52px;height:52px}.mini-card-one{right:0;top:30px}.mini-card-two{left:0;bottom:25px}.trust-grid{grid-template-columns:1fr}.trust-grid>div{border-right:0;border-bottom:1px solid #eee8e4}.marketing-section{padding:68px 0}.section-title-row{align-items:flex-start;flex-direction:column;margin-bottom:26px}.solution-grid{grid-template-columns:1fr}.solution-image{height:220px}.approach-grid{gap:35px}.editorial-gallery{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:280px 180px 180px}.editorial-gallery .gallery-large{grid-column:1/3;grid-row:auto}.editorial-gallery figure:nth-child(4){grid-column:1/3}.knowledge-feature{grid-template-columns:1fr}.knowledge-visual{height:240px}.affiliate-band h2{font-size:34px}.affiliate-band-actions{flex-direction:column}.affiliate-band-actions .btn{width:100%}.form-grid-2{grid-template-columns:1fr}.footer-main{grid-template-columns:1fr}.footer-bottom{flex-direction:column;gap:7px}.member-auth-shell{padding:20px;background:linear-gradient(180deg,#865344 0,#a56f5c 36%,#f6f0ec 36%,#fff 100%)}.auth-logo{left:22px;top:22px}.member-auth-grid{grid-template-columns:1fr;gap:18px;align-items:start;padding-top:85px}.member-auth-story{padding:20px 0}.member-auth-story h1{font-size:38px}.member-auth-card{padding:24px}.auth-logo .logo-copy strong{color:#fff}}

/* =========================================================
   Dr. Thu Landing V3 — reference-inspired premium layout
   ========================================================= */
.ref3-page{--r3-bg:#f8f5f2;--r3-paper:#fff;--r3-ink:#17222d;--r3-muted:#6d7782;--r3-line:#e9e0da;--r3-warm:#985f4d;--r3-warm2:#b87963;--r3-cream:#f0e4dc;--r3-rose:#f5ebe6;--r3-green:#4b8069;background:var(--r3-bg);color:var(--r3-ink);font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.01em}.ref3-page h1,.ref3-page h2,.ref3-page h3,.ref3-page p{margin-top:0}.ref3-page h1,.ref3-page h2{font-family:"Playfair Display",Georgia,"Times New Roman",serif;letter-spacing:-.035em}.ref3-page img{display:block;max-width:100%}.ref3-shell{width:min(1380px,calc(100% - 64px));margin:0 auto}.ref3-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(16px);border-bottom:1px solid #eee8e4}.ref3-header-inner{height:78px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:36px}.ref3-logo{display:flex;align-items:center;gap:12px;min-width:max-content}.ref3-logo-mark{width:42px;height:42px;border:1px solid #ddbbaa;border-radius:50%;display:grid;place-items:center;font-family:"Playfair Display",serif;font-size:17px;font-weight:700;color:var(--r3-warm);background:#fff}.ref3-logo-copy{display:flex;flex-direction:column;line-height:1}.ref3-logo-copy strong{font-family:"Playfair Display",serif;font-size:22px;color:#25313c}.ref3-logo-copy small{font-size:7px;letter-spacing:.20em;color:#8b98a4;margin-top:6px}.ref3-nav{display:flex;align-items:center;justify-content:center;gap:34px}.ref3-nav a{position:relative;padding:29px 0 25px;font-size:12px;font-weight:500;color:#48525b}.ref3-nav a:hover,.ref3-nav a.active{color:var(--r3-warm)}.ref3-nav a.active:after{content:"";position:absolute;left:0;right:0;bottom:17px;height:1px;background:var(--r3-warm)}.ref3-auth-actions{display:flex;align-items:center;gap:10px}.ref3-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid transparent;border-radius:10px;padding:11px 18px;font-weight:700;font-size:11px;line-height:1;transition:.2s ease;cursor:pointer;text-decoration:none}.ref3-btn:hover{transform:translateY(-1px)}.ref3-btn-primary{background:linear-gradient(135deg,#9c6250,#85503f);color:#fff;box-shadow:0 9px 24px rgba(119,74,59,.16)}.ref3-btn-outline{background:#fff;color:#805143;border-color:#c9937f}.ref3-btn-white{background:rgba(255,255,255,.72);color:#5e4239;border-color:#a87565}.ref3-btn-sm{padding:11px 16px}.ref3-btn-lg{padding:15px 24px;border-radius:11px;font-size:12px}.ref3-btn-full{width:100%}.ref3-btn-cream{background:#fff5ef;color:#74483b;border-color:rgba(255,255,255,.6)}.ref3-btn-dark-outline{background:transparent;color:#fff;border-color:rgba(255,255,255,.72)}.ref3-icon{width:15px;height:15px;display:inline-block;position:relative;flex:0 0 15px}.ref3-icon-user:before{content:"";position:absolute;width:5px;height:5px;border:1.5px solid currentColor;border-radius:50%;left:4px;top:1px}.ref3-icon-user:after{content:"";position:absolute;width:10px;height:5px;border:1.5px solid currentColor;border-bottom:0;border-radius:8px 8px 0 0;left:1.5px;bottom:1px}.ref3-icon-calendar:before{content:"";position:absolute;inset:2px 1px 1px;border:1.5px solid currentColor;border-radius:2px}.ref3-icon-calendar:after{content:"";position:absolute;left:3px;right:3px;top:6px;border-top:1.5px solid currentColor;box-shadow:2px -5px 0 -1px currentColor,-3px -5px 0 -1px currentColor}.ref3-icon-play{border:1.5px solid currentColor;border-radius:50%}.ref3-icon-play:after{content:"";position:absolute;left:5px;top:3.5px;border-left:5px solid currentColor;border-top:3px solid transparent;border-bottom:3px solid transparent}.ref3-icon-phone:before{content:"☎";font-style:normal;font-size:14px}.ref3-icon-list:before{content:"☷";font-style:normal;font-size:16px}.ref3-hero{background:linear-gradient(90deg,#faf7f4 0%,#f7f3ef 51%,#efe4db 100%);overflow:hidden}.ref3-hero-grid{min-height:405px;display:grid;grid-template-columns:1.1fr .75fr .47fr;align-items:stretch;position:relative}.ref3-hero-copy{padding:46px 24px 34px 0;z-index:2}.ref3-kicker{font-size:10px;letter-spacing:.19em;font-weight:800;color:#b36f57;margin-bottom:11px}.ref3-hero-copy h1{font-size:clamp(47px,4.7vw,70px);line-height:.99;font-weight:500;color:#1e2a34;margin-bottom:12px}.ref3-hero-copy h1 em{color:#9c6250;font-style:italic}.ref3-hero-copy>p{max-width:650px;color:#66717c;font-size:13px;line-height:1.65;margin-bottom:18px}.ref3-hero-actions{display:flex;gap:12px;margin-bottom:24px}.ref3-hero-values{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:740px}.ref3-hero-values>div{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:center}.ref3-value-icon{font-family:Georgia,serif;font-size:30px;line-height:1;color:#aa6c57}.ref3-hero-values span:last-child{display:flex;flex-direction:column}.ref3-hero-values strong{font-size:10px;color:#8d5645;margin-bottom:4px}.ref3-hero-values small{font-size:8.5px;color:#7c858d;line-height:1.35}.ref3-doctor-stage{position:relative;display:flex;align-items:flex-end;justify-content:center;min-width:0}.ref3-doctor-glow{position:absolute;width:390px;height:390px;border-radius:50%;background:rgba(255,255,255,.64);filter:blur(1px);top:2px;left:50%;transform:translateX(-50%)}.ref3-doctor-stage img{height:405px;width:100%;object-fit:contain;object-position:center bottom;position:relative;z-index:2;filter:drop-shadow(0 15px 35px rgba(70,48,40,.10))}.ref3-hero-note{padding:60px 0 34px 30px;display:flex;flex-direction:column;justify-content:center;position:relative;border-left:1px solid rgba(166,118,98,.10)}.ref3-note-script{font-family:"Playfair Display",serif;font-size:29px;line-height:1.2;font-style:italic;color:#b09282;opacity:.78;margin-bottom:22px}.ref3-note-line{width:58px;height:1px;background:#c9a598;margin-bottom:19px}.ref3-hero-note blockquote{margin:0 0 20px;font-family:"Playfair Display",serif;font-style:italic;font-size:13px;line-height:1.55;color:#38424a}.ref3-signature{font-family:"Playfair Display",serif;font-size:28px;font-style:italic;color:#34404a;margin-bottom:5px}.ref3-hero-note>span{font-size:7.5px;letter-spacing:.13em;line-height:1.45;color:#6f7780}.ref3-stats{background:#fff;border-top:1px solid #ede7e3;border-bottom:1px solid #ede7e3}.ref3-stats-grid{display:grid;grid-template-columns:repeat(4,1fr)}.ref3-stats-grid>div{min-height:72px;display:grid;grid-template-columns:38px auto;grid-template-rows:auto auto;column-gap:10px;align-content:center;padding:10px 28px;border-right:1px solid #eee7e3}.ref3-stats-grid>div:last-child{border-right:0}.ref3-stat-icon{grid-row:1/3;align-self:center;color:#bd7a62;font-size:22px}.ref3-stats strong{font-size:17px;color:#8f503d}.ref3-stats small{font-size:9px;color:#7d858c;font-style:italic}.ref3-content-area{background:#fbf9f7;padding:26px 0 32px}.ref3-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:24px;align-items:start}.ref3-main-column{min-width:0}.ref3-section{padding:0 0 28px}.ref3-section+.ref3-section{padding-top:2px}.ref3-section-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:13px}.ref3-section-head h2,.ref3-split-head h2{font-family:"Playfair Display",serif;font-size:20px;letter-spacing:-.02em;margin-bottom:2px;color:#1e2933}.ref3-section-head p,.ref3-split-head p{font-size:10px;color:#77818a;margin:0}.ref3-section-head-tight{margin-bottom:10px}.ref3-service-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.ref3-service-card{background:#fff;border:1px solid var(--r3-line);border-radius:9px;overflow:hidden;transition:.2s ease}.ref3-service-card:hover{transform:translateY(-2px);box-shadow:0 11px 28px rgba(64,45,37,.08)}.ref3-service-card img{width:100%;height:102px;object-fit:cover}.ref3-service-card div{padding:9px 9px 11px}.ref3-service-card h3{font-size:10px;margin-bottom:4px;line-height:1.25}.ref3-service-card p{font-size:8.5px;line-height:1.45;color:#6d7881;margin:0}.ref3-why-grid{display:grid;grid-template-columns:1.55fr .65fr;gap:16px;align-items:stretch}.ref3-why-features{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border:1px solid var(--r3-line);border-radius:11px;overflow:hidden}.ref3-why-features article{padding:16px 14px;border-right:1px solid #eee8e4}.ref3-why-features article:last-child{border-right:0}.ref3-why-features article>span{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;background:#f7ece7;color:#a96650;font-size:16px;margin-bottom:9px}.ref3-why-features h3{font-size:9.5px;color:#9a5d49;margin-bottom:5px}.ref3-why-features p{font-size:8.2px;color:#707b84;line-height:1.55;margin:0}.ref3-quote-card{background:linear-gradient(135deg,#f2e7df,#f8f3ef);border-radius:11px;padding:15px 20px;position:relative;overflow:hidden}.ref3-quote-card:after{content:"";position:absolute;width:105px;height:105px;border-radius:50%;background:rgba(255,255,255,.45);right:-20px;bottom:-28px}.ref3-big-quote{font-family:Georgia,serif;font-size:40px;line-height:.7;color:#bf866e}.ref3-quote-card p{font-family:"Playfair Display",serif;font-style:italic;font-size:10.5px;line-height:1.55;color:#5a5451;margin:7px 0 9px;position:relative;z-index:2}.ref3-signature-dark{font-size:21px;color:#3d444a;position:relative;z-index:2}.ref3-split-head{display:grid;grid-template-columns:1.05fr 1fr;gap:18px;margin-bottom:9px}.ref3-bottom-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:18px}.ref3-gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.ref3-gallery-grid figure{margin:0;border-radius:8px;overflow:hidden;background:#eee;height:126px}.ref3-gallery-grid img{width:100%;height:100%;object-fit:cover}.ref3-testimonials{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.ref3-testimonials article{background:#fff;border:1px solid var(--r3-line);border-radius:9px;padding:10px;display:flex;flex-direction:column;min-height:126px}.ref3-testimonial-top{display:flex;align-items:center;gap:7px;margin-bottom:7px}.ref3-avatar{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#ead5cc;color:#925b48;font-size:8px;font-weight:800}.ref3-testimonial-top div{display:flex;flex-direction:column}.ref3-testimonial-top strong{font-size:8.5px}.ref3-testimonial-top small{font-size:7px;margin-top:2px}.ref3-testimonials p{font-size:8px;line-height:1.45;color:#66717a;margin:0 0 7px}.ref3-stars{margin-top:auto;color:#e6a045;font-size:9px;letter-spacing:1px}.ref3-knowledge-mini{padding-top:3px}.ref3-knowledge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.ref3-knowledge-grid article{display:grid;grid-template-columns:104px 1fr;background:#fff;border:1px solid var(--r3-line);border-radius:10px;overflow:hidden;min-height:98px}.ref3-knowledge-grid img{width:104px;height:100%;object-fit:cover}.ref3-knowledge-grid article>div{padding:11px}.ref3-knowledge-grid span{font-size:6.5px;letter-spacing:.12em;color:#ac6b54;font-weight:800}.ref3-knowledge-grid h3{font-family:"Inter",sans-serif;font-size:9.5px;line-height:1.3;margin:5px 0}.ref3-knowledge-grid p{font-size:7.5px;color:#737d85;line-height:1.45;margin:0}.ref3-booking-wrap{position:sticky;top:96px}.ref3-booking-card{background:linear-gradient(165deg,#f7eae3,#fff 38%);border:1px solid #ead8ce;border-radius:16px;padding:22px;box-shadow:0 16px 42px rgba(100,70,57,.08);position:relative;overflow:hidden}.ref3-booking-decor{position:absolute;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,#dce8d8 0 5%,#a5b795 6% 7%,transparent 8%);right:-40px;top:-45px;opacity:.65}.ref3-booking-head{position:relative;z-index:2}.ref3-booking-head h2{font-size:27px;line-height:1.04;margin:5px 0 8px;color:#86503f}.ref3-booking-head p{font-size:10px;color:#696f75;line-height:1.5;margin-bottom:16px}.ref3-booking-form{display:grid;gap:9px;position:relative;z-index:2}.ref3-booking-form label>span:first-child{font-size:8px;color:#68727b;margin:0 0 4px 2px;display:block}.ref3-booking-form label b{color:#b65d4d}.ref3-field{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e1d7d1;border-radius:7px;padding:0 10px;box-shadow:0 2px 8px rgba(86,62,52,.03)}.ref3-field i{color:#a76650}.ref3-field input,.ref3-field select{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:10px 0!important;font-size:9px;min-width:0}.ref3-field input:focus,.ref3-field select:focus{box-shadow:none!important}.ref3-consent{display:grid!important;grid-template-columns:auto 1fr;gap:7px;align-items:start;font-weight:500!important}.ref3-consent input{width:auto;margin-top:2px}.ref3-consent span{font-size:7.5px!important;line-height:1.4;color:#778087!important}.ref3-referral-note{font-size:8px;padding:8px 9px;border-radius:7px;background:#edf5f0;color:#4c745f}.ref3-booking-assurance{text-align:center;font-size:7px;color:#77817f}.ref3-booking-assurance span{color:#4f926e}.ref3-affiliate-band{background:linear-gradient(100deg,#8f5442,#a76f5c 65%,#92513f);color:#fff;padding:20px 0}.ref3-affiliate-inner{display:flex;justify-content:space-between;align-items:center;gap:28px}.ref3-affiliate-copy{display:flex;gap:16px;align-items:center}.ref3-affiliate-icon{width:46px;height:46px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.45);border-radius:50%;font-size:26px}.ref3-affiliate-copy h3{font-family:"Playfair Display",serif;font-size:16px;margin:0 0 4px;color:#fff}.ref3-affiliate-copy p{font-size:8.5px;color:#efdcd4;margin:0}.ref3-affiliate-actions{display:flex;gap:9px}.ref3-footer{background:#242a2f;color:#fff;padding-top:36px}.ref3-footer-grid{display:grid;grid-template-columns:1.4fr .65fr .75fr 1fr;gap:44px;padding-bottom:28px}.ref3-footer-logo .ref3-logo-mark{background:transparent;color:#dcae9d;border-color:#67554e}.ref3-footer-logo .ref3-logo-copy strong{color:#fff}.ref3-footer-logo .ref3-logo-copy small{color:#8d999f}.ref3-footer-brand p,.ref3-footer a,.ref3-footer>div>div>p{font-size:9px;color:#aab3b9;line-height:1.65}.ref3-footer h4{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#efe4df;margin:0 0 12px}.ref3-footer-grid>div:not(.ref3-footer-brand){display:flex;flex-direction:column;gap:7px}.ref3-footer-bottom{border-top:1px solid #353d42;padding:13px 0 16px;display:flex;justify-content:space-between;color:#7e898f;font-size:8px}
@media(max-width:1180px){.ref3-nav{gap:18px}.ref3-nav a{font-size:10px}.ref3-hero-grid{grid-template-columns:1.1fr .75fr}.ref3-hero-note{display:none}.ref3-content-grid{grid-template-columns:minmax(0,1fr) 300px}.ref3-service-grid{grid-template-columns:repeat(3,1fr)}.ref3-service-card img{height:125px}.ref3-why-grid{grid-template-columns:1fr}.ref3-split-head,.ref3-bottom-grid{grid-template-columns:1fr}.ref3-gallery-grid figure{height:150px}.ref3-testimonials article{min-height:145px}}
@media(max-width:900px){.ref3-shell{width:min(100% - 32px,1380px)}.ref3-header-inner{grid-template-columns:auto 1fr}.ref3-nav{display:none}.ref3-auth-actions{justify-self:end}.ref3-hero-grid{grid-template-columns:1fr .72fr;min-height:auto}.ref3-hero-copy{padding:42px 0}.ref3-doctor-stage img{height:400px}.ref3-content-grid{grid-template-columns:1fr}.ref3-booking-wrap{position:relative;top:auto}.ref3-booking-card{max-width:620px;margin:auto}.ref3-stats-grid{grid-template-columns:1fr 1fr}.ref3-stats-grid>div:nth-child(2){border-right:0}.ref3-why-features{grid-template-columns:1fr 1fr}.ref3-why-features article:nth-child(2){border-right:0}.ref3-why-features article:nth-child(-n+2){border-bottom:1px solid #eee8e4}.ref3-gallery-grid{grid-template-columns:1fr 1fr}.ref3-testimonials{grid-template-columns:1fr 1fr 1fr}.ref3-knowledge-grid{grid-template-columns:1fr}.ref3-footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.ref3-header-inner{height:68px;gap:10px}.ref3-logo-mark{width:37px;height:37px}.ref3-logo-copy strong{font-size:18px}.ref3-logo-copy small{font-size:5.5px}.ref3-auth-actions{gap:5px}.ref3-auth-actions .ref3-btn{padding:9px 10px;font-size:9px}.ref3-hero-grid{grid-template-columns:1fr}.ref3-hero-copy{padding:34px 0 0}.ref3-hero-copy h1{font-size:44px}.ref3-hero-copy>p{font-size:12px}.ref3-hero-actions{flex-direction:column}.ref3-hero-actions .ref3-btn{width:100%}.ref3-hero-values{grid-template-columns:1fr;gap:9px}.ref3-doctor-stage{height:360px}.ref3-doctor-stage img{height:370px}.ref3-stats-grid{grid-template-columns:1fr 1fr}.ref3-stats-grid>div{padding:10px 12px}.ref3-stats strong{font-size:15px}.ref3-content-area{padding-top:20px}.ref3-service-grid{grid-template-columns:1fr 1fr}.ref3-service-card img{height:110px}.ref3-why-features{grid-template-columns:1fr}.ref3-why-features article{border-right:0!important;border-bottom:1px solid #eee8e4}.ref3-why-features article:last-child{border-bottom:0}.ref3-split-head{gap:14px}.ref3-gallery-grid{grid-template-columns:1fr 1fr}.ref3-gallery-grid figure{height:120px}.ref3-testimonials{grid-template-columns:1fr}.ref3-knowledge-grid article{grid-template-columns:90px 1fr}.ref3-knowledge-grid img{width:90px}.ref3-affiliate-inner{flex-direction:column;align-items:flex-start}.ref3-affiliate-actions{width:100%;flex-direction:column}.ref3-affiliate-actions .ref3-btn{width:100%}.ref3-footer-grid{grid-template-columns:1fr}.ref3-footer-bottom{flex-direction:column;gap:4px}.ref3-booking-card{padding:19px}.ref3-booking-head h2{font-size:24px}}

/* ==========================================================
   DR. THU LANDING V4 — PIXEL-CLOSE REBUILD FROM USER REFERENCE
   ========================================================== */
.dr4-page{--d4-ink:#17232c;--d4-copy:#65727b;--d4-accent:#9b5e49;--d4-accent-dark:#7e4938;--d4-rose:#bd8069;--d4-bg:#fbfaf8;--d4-warm:#f7f0eb;--d4-line:#e8dfd9;background:#fff;color:var(--d4-ink);font-family:Inter,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased}.dr4-page *{box-sizing:border-box}.dr4-page h1,.dr4-page h2,.dr4-page h3,.dr4-page p,.dr4-page blockquote,.dr4-page figure{margin-top:0}.dr4-page img{display:block;max-width:100%}.dr4-page button,.dr4-page input,.dr4-page select{font:inherit}.dr4-container{width:min(1176px,calc(100% - 48px));margin:0 auto}.dr4-header{height:55px;background:rgba(255,255,255,.98);border-bottom:1px solid #eee9e5;position:sticky;top:0;z-index:50}.dr4-header-inner{height:55px;display:grid;grid-template-columns:235px 1fr 205px;align-items:center;gap:16px}.dr4-brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--d4-ink);min-width:0}.dr4-brand-symbol{width:35px;height:38px;color:#d8a893;display:grid;place-items:center}.dr4-brand-symbol svg{width:100%;height:100%}.dr4-brand-copy{display:flex;flex-direction:column;line-height:1}.dr4-brand-copy strong{font-family:"Playfair Display",Georgia,serif;font-size:24px;font-weight:600;letter-spacing:-.02em}.dr4-brand-copy small{margin-top:5px;color:#91a0aa;font-size:6.3px;font-weight:600;letter-spacing:.19em}.dr4-nav{display:flex;justify-content:center;align-items:stretch;gap:34px;height:55px}.dr4-nav a{display:flex;align-items:center;position:relative;text-decoration:none;color:#34404a;font-size:9.5px;font-weight:500;white-space:nowrap}.dr4-nav a.active{color:#9a5a46}.dr4-nav a.active:after{content:"";height:1px;background:#b97962;position:absolute;left:0;right:0;bottom:11px}.dr4-header-actions{justify-self:end;display:flex;align-items:center;gap:9px}.dr4-auth-btn{height:32px;padding:0 15px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;font-size:8.7px;font-weight:700;white-space:nowrap}.dr4-auth-btn svg{width:13px;height:13px}.dr4-auth-outline{border:1px solid #b87b65;color:#8b5341;background:#fff}.dr4-auth-solid{background:#9b5e49;color:#fff;border:1px solid #9b5e49}.dr4-main{overflow:hidden}.dr4-hero{height:365px;background:radial-gradient(circle at 35% 50%,rgba(255,255,255,.96) 0 22%,rgba(249,245,241,.7) 51%,rgba(240,229,221,.93) 100%);border-bottom:1px solid #eee7e2;position:relative}.dr4-hero:after{content:"";position:absolute;right:0;top:0;bottom:0;width:25%;background:linear-gradient(90deg,rgba(247,239,233,.2),rgba(235,220,209,.58));pointer-events:none}.dr4-hero-grid{height:365px;display:grid;grid-template-columns:52% 29% 19%;position:relative;z-index:2}.dr4-hero-copy{padding:29px 22px 14px 0;display:flex;flex-direction:column}.dr4-kicker{font-size:8.5px;letter-spacing:.21em;color:#af6c54;font-weight:800;margin-bottom:8px}.dr4-hero-copy h1{font-family:"Playfair Display",Georgia,serif;font-size:42px;line-height:1.03;font-weight:500;letter-spacing:-.035em;color:#17242d;margin-bottom:7px}.dr4-hero-copy h1 em{font-style:italic;color:#9f624d;font-weight:500}.dr4-hero-copy>p{max-width:540px;margin-bottom:13px;color:#697780;font-size:11.2px;line-height:1.58}.dr4-hero-buttons{display:flex;gap:11px;margin-bottom:20px}.dr4-primary-btn,.dr4-secondary-btn{height:46px;border-radius:8px;padding:0 22px;display:inline-flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;font-size:10px;font-weight:700}.dr4-primary-btn{background:linear-gradient(180deg,#a66852,#8e523f);color:#fff;box-shadow:0 7px 18px rgba(116,66,49,.12)}.dr4-primary-btn>svg{width:16px;height:16px}.dr4-secondary-btn{background:rgba(255,255,255,.66);border:1px solid #8e6a5d;color:#523f38}.dr4-play{width:21px;height:21px;display:grid;place-items:center}.dr4-play svg{width:21px;height:21px}.dr4-hero-benefits{margin-top:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.dr4-hero-benefits>div{display:flex;align-items:center;gap:9px;min-width:0}.dr4-benefit-icon{width:30px;height:30px;color:#b7745b;flex:0 0 auto}.dr4-benefit-icon svg{width:100%;height:100%}.dr4-hero-benefits span:last-child{display:flex;flex-direction:column;min-width:0}.dr4-hero-benefits strong{font-size:9px;color:#9b5e49;line-height:1.25}.dr4-hero-benefits small{font-size:7.5px;color:#71808a;margin-top:2px;line-height:1.25}.dr4-hero-doctor{position:relative;height:365px;align-self:end;overflow:hidden}.dr4-soft-orb{position:absolute;width:325px;height:325px;border-radius:50%;background:rgba(239,224,214,.92);left:50%;top:34px;transform:translateX(-50%)}.dr4-hero-doctor img{position:absolute;height:375px;width:auto;max-width:none;left:50%;bottom:-8px;transform:translateX(-50%);object-fit:contain;filter:saturate(.94) contrast(.98)}.dr4-hero-quote{height:365px;padding:55px 6px 0 25px;position:relative;z-index:2;background:linear-gradient(90deg,rgba(241,232,225,.22),rgba(241,230,222,.63))}.dr4-script-title{font-family:"Playfair Display",Georgia,serif;font-style:italic;color:#9f836f;font-size:22px;line-height:1.35;transform:rotate(-4deg);margin:0 0 42px 3px;opacity:.52}.dr4-hero-quote blockquote{font-family:"Playfair Display",Georgia,serif;font-style:italic;font-size:12px;line-height:1.55;color:#343b40;width:175px;margin-bottom:16px}.dr4-signature{font-family:"Playfair Display",Georgia,serif;font-style:italic;font-size:28px;line-height:1;color:#24323a;transform:rotate(-8deg);display:inline-block;margin-bottom:10px}.dr4-hero-quote>p{font-size:7.2px;letter-spacing:.15em;line-height:1.55;color:#5d686f;font-weight:600}.dr4-numbers{height:64px;background:#fff;border-bottom:1px solid #eee7e2}.dr4-numbers-grid{height:64px;display:grid;grid-template-columns:repeat(4,1fr);align-items:center}.dr4-numbers-grid>div{display:flex;justify-content:center;align-items:center;gap:13px}.dr4-number-icon{width:26px;height:26px;color:#bc7d65}.dr4-number-icon svg{width:100%;height:100%}.dr4-numbers-grid>div>span:last-child{display:flex;flex-direction:column}.dr4-numbers strong{font-size:16px;line-height:1;color:#8c513e}.dr4-numbers small{font-size:7.5px;color:#77828a;margin-top:3px;font-style:italic}.dr4-body-section{background:linear-gradient(180deg,#fdfcfa,#faf8f5);padding:20px 0 12px}.dr4-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 284px;gap:22px;align-items:start}.dr4-section-heading h2,.dr4-social-proof h2{font-family:"Playfair Display",Georgia,serif;font-size:19px;line-height:1.1;color:#18242d;margin-bottom:2px}.dr4-section-heading p{font-size:9px;color:#748089;margin:0}.dr4-service-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-top:12px}.dr4-service-card{border:1px solid #e9e1dc;background:#fff;border-radius:8px;overflow:hidden;min-width:0}.dr4-service-card img{width:100%;height:104px;object-fit:cover}.dr4-service-card>div{padding:9px 9px 10px}.dr4-service-card h3{font-size:9.4px;line-height:1.22;margin:0 0 5px;color:#18232b}.dr4-service-card p{font-size:7.6px;line-height:1.45;color:#697780;margin:0}.dr4-about{margin-top:22px;position:relative}.dr4-about-heading{margin-bottom:11px}.dr4-about-row{display:grid;grid-template-columns:minmax(0,1.8fr) 260px;gap:17px;align-items:stretch}.dr4-feature-grid{display:grid;grid-template-columns:repeat(4,1fr)}.dr4-feature-grid article{padding:1px 13px 6px;border-right:1px solid #eae5e1}.dr4-feature-grid article:first-child{padding-left:0}.dr4-feature-grid article:last-child{border-right:0}.dr4-feature-circle{width:34px;height:34px;border-radius:50%;background:#f3e5de;color:#a76a53;display:grid;place-items:center;margin:0 auto 7px}.dr4-feature-circle svg{width:20px;height:20px}.dr4-feature-grid h3{text-align:center;font-size:8.7px;color:#995d47;margin:0 0 4px;white-space:nowrap}.dr4-feature-grid p{text-align:center;font-size:7.4px;line-height:1.45;color:#738089;margin:0}.dr4-quote-card{height:144px;border-radius:9px;overflow:hidden;position:relative;background:#efe5dd}.dr4-quote-card img{position:absolute;width:100%;height:100%;object-fit:cover;right:0;top:0;opacity:.5}.dr4-quote-overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(248,241,236,.97) 0 64%,rgba(248,241,236,.5) 100%)}.dr4-quote-content{position:relative;z-index:2;width:68%;padding:17px 0 0 24px}.dr4-quote-content>span{font-family:Georgia,serif;font-size:30px;line-height:.6;color:#bd7c63}.dr4-quote-content p{font-family:"Playfair Display",Georgia,serif;font-style:italic;font-size:10px;line-height:1.48;color:#4b4c4d;margin:3px 0 4px}.dr4-quote-content strong{font-family:"Playfair Display",Georgia,serif;font-style:italic;font-size:20px;font-weight:500;display:inline-block;transform:rotate(-7deg);color:#314047}.dr4-more-btn{height:24px;margin-top:8px;padding:0 13px;border:1px solid #bd7d65;border-radius:6px;color:#965841;text-decoration:none;font-size:7.7px;font-weight:700;display:inline-flex;align-items:center;gap:15px;background:#fff}.dr4-booking-card{background:linear-gradient(160deg,#f7ebe4,#fff 47%);border:1px solid #ead7cc;border-radius:14px;padding:19px 16px 15px;box-shadow:0 10px 28px rgba(95,67,55,.08);min-height:419px;position:relative;overflow:hidden}.dr4-booking-leaves{position:absolute;right:-6px;top:-20px;font-size:86px;line-height:1;color:#708b58;transform:rotate(37deg);opacity:.9}.dr4-booking-card h2{font-family:"Playfair Display",Georgia,serif;font-size:23px;line-height:1.03;color:#8a503d;margin:0 0 4px;position:relative;z-index:2}.dr4-booking-card>p{font-size:9.2px;line-height:1.45;color:#626e76;margin-bottom:13px;position:relative;z-index:2}.dr4-booking-form{display:grid;gap:7px;position:relative;z-index:2}.dr4-form-field{display:grid!important;grid-template-columns:29px 1fr;gap:6px;align-items:center;background:#fff;border:1px solid #ded5cf;border-radius:7px;padding:5px 9px;min-height:43px;box-shadow:0 1px 6px rgba(88,61,51,.025);font-weight:500!important}.dr4-field-icon{width:18px;height:18px;color:#a76952}.dr4-field-icon svg{width:18px;height:18px}.dr4-form-field>span:last-child{display:grid;min-width:0}.dr4-form-field small{font-size:6.8px;color:#7b8388;line-height:1.1;margin-bottom:2px}.dr4-form-field small b{color:#c34f3f}.dr4-form-field input,.dr4-form-field select{padding:0!important;height:16px!important;min-height:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font-size:7.7px!important;color:#6d777e!important}.dr4-form-field select{appearance:auto}.dr4-form-field input:focus,.dr4-form-field select:focus{box-shadow:none!important}.dr4-book-submit{height:39px;border:0;border-radius:7px;background:linear-gradient(180deg,#a5654e,#8f523e);color:#fff;font-size:9.5px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}.dr4-book-submit svg{width:14px;height:14px}.dr4-form-note{font-size:6.8px;text-align:center;color:#7a8385}.dr4-form-note span{color:#2b9a63;border:1px solid #2b9a63;width:12px;height:12px;border-radius:50%;display:inline-grid;place-items:center;margin-right:2px}.dr4-ref-code{font-size:7px;text-align:center;color:#6d777e;background:#f4f0ed;padding:5px;border-radius:5px}.dr4-social-proof{background:#fff;border-top:1px solid #eee8e4;padding:9px 0 12px}.dr4-social-grid{display:grid;grid-template-columns:1fr 1.02fr;gap:18px}.dr4-social-proof h2{font-size:17px;margin-bottom:7px}.dr4-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.dr4-gallery figure{height:111px;margin:0;border-radius:6px;overflow:hidden;background:#eee}.dr4-gallery img{width:100%;height:100%;object-fit:cover}.dr4-gallery figure:first-child img{object-position:center 22%}.dr4-testimonial-head{display:flex;align-items:center;justify-content:space-between}.dr4-testimonial-head>span{display:flex;gap:5px}.dr4-testimonial-head button{width:22px;height:22px;border:0;border-radius:50%;background:#f5f0ed;color:#8c604f;font-size:10px}.dr4-testimonial-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.dr4-testimonial-grid article{height:111px;border:1px solid #e9e2de;border-radius:7px;padding:8px;background:#fff;display:flex;flex-direction:column;min-width:0}.dr4-reviewer{display:grid;grid-template-columns:27px 1fr;gap:6px;align-items:start;margin-bottom:5px}.dr4-review-avatar{width:27px;height:27px;border-radius:50%;overflow:hidden}.dr4-review-avatar img{width:100%;height:100%;object-fit:cover}.dr4-reviewer p{font-size:6.9px;line-height:1.4;color:#59666e;margin:0}.dr4-testimonial-grid article>strong{font-size:7.3px;margin-left:33px}.dr4-testimonial-grid article>small{font-size:6.2px;color:#899198;margin:1px 0 0 33px}.dr4-stars{font-size:8px;color:#eda12d;letter-spacing:.6px;margin:4px 0 0 33px}.dr4-affiliate-band{height:61px;background:linear-gradient(90deg,#925540,#a86a54 70%,#93543f);color:#fff;position:relative;overflow:hidden}.dr4-affiliate-band:after{content:"";position:absolute;width:150px;height:150px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:-45px;top:-60px}.dr4-affiliate-inner{height:61px;display:flex;align-items:center;justify-content:space-between;gap:20px;position:relative;z-index:2}.dr4-affiliate-copy{display:flex;align-items:center;gap:15px}.dr4-network-icon{width:42px;height:42px;display:grid;place-items:center}.dr4-network-icon svg{width:39px;height:39px}.dr4-affiliate-copy h3{font-family:"Playfair Display",Georgia,serif;font-size:13.5px;font-weight:600;color:#fff;margin:0 0 3px}.dr4-affiliate-copy p{font-size:7.4px;color:#f4ded5;margin:0}.dr4-affiliate-actions{display:flex;align-items:center;gap:8px}.dr4-affiliate-login,.dr4-affiliate-register{height:32px;border-radius:18px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:8px;font-weight:600}.dr4-affiliate-login{background:#fff;color:#915741}.dr4-affiliate-login svg{width:13px;height:13px;margin-right:6px}.dr4-affiliate-register{border:1px solid rgba(255,255,255,.75);color:#fff;min-width:145px}.dr4-affiliate-arrow{font-size:21px;margin-left:5px}
@media(max-width:1050px){.dr4-header-inner{grid-template-columns:210px 1fr 190px}.dr4-nav{gap:18px}.dr4-hero-grid{grid-template-columns:55% 45%}.dr4-hero-quote{display:none}.dr4-main-grid{grid-template-columns:1fr}.dr4-booking-card{max-width:520px;margin:0 auto}.dr4-service-grid{grid-template-columns:repeat(3,1fr)}.dr4-service-card img{height:150px}.dr4-about-row{grid-template-columns:1fr}.dr4-quote-card{height:160px}.dr4-social-grid{grid-template-columns:1fr}.dr4-gallery figure{height:150px}.dr4-testimonial-grid article{height:auto;min-height:130px}}
@media(max-width:820px){.dr4-header{height:auto}.dr4-header-inner{height:auto;min-height:64px;grid-template-columns:1fr auto}.dr4-nav{display:none}.dr4-auth-btn{height:34px}.dr4-hero{height:auto}.dr4-hero-grid{height:auto;grid-template-columns:1fr}.dr4-hero-copy{padding:34px 0 0}.dr4-hero-copy h1{font-size:46px}.dr4-hero-doctor{height:390px}.dr4-hero-doctor img{height:410px}.dr4-hero-benefits{margin:18px 0}.dr4-numbers,.dr4-numbers-grid{height:auto}.dr4-numbers-grid{grid-template-columns:1fr 1fr;padding:12px 0;gap:12px}.dr4-numbers-grid>div{justify-content:flex-start;padding-left:20px}.dr4-about-row{grid-template-columns:1fr}.dr4-social-grid{grid-template-columns:1fr}.dr4-affiliate-inner{height:auto;min-height:85px;padding:12px 0}.dr4-affiliate-band{height:auto}.dr4-affiliate-actions{flex-wrap:wrap}}
@media(max-width:600px){.dr4-container{width:min(100% - 28px,1176px)}.dr4-brand-copy strong{font-size:20px}.dr4-brand-copy small{font-size:5.3px}.dr4-header-actions{gap:5px}.dr4-auth-btn{padding:0 10px;font-size:8px}.dr4-hero-copy h1{font-size:39px}.dr4-hero-copy>p{font-size:11px}.dr4-hero-buttons{display:grid}.dr4-primary-btn,.dr4-secondary-btn{width:100%}.dr4-hero-benefits{grid-template-columns:1fr}.dr4-hero-doctor{height:330px}.dr4-hero-doctor img{height:355px}.dr4-numbers-grid{grid-template-columns:1fr 1fr}.dr4-numbers-grid>div{padding:6px 0}.dr4-service-grid{grid-template-columns:1fr 1fr}.dr4-service-card img{height:110px}.dr4-feature-grid{grid-template-columns:1fr 1fr;gap:14px}.dr4-feature-grid article:nth-child(2){border-right:0}.dr4-feature-grid article{border-bottom:1px solid #ece5e1;padding:8px}.dr4-feature-grid article:nth-child(n+3){border-bottom:0}.dr4-gallery{grid-template-columns:1fr 1fr}.dr4-gallery figure{height:135px}.dr4-testimonial-grid{grid-template-columns:1fr}.dr4-testimonial-grid article{min-height:110px}.dr4-affiliate-inner{align-items:flex-start;flex-direction:column}.dr4-affiliate-actions{width:100%}.dr4-affiliate-login,.dr4-affiliate-register{flex:1}.dr4-affiliate-copy h3{font-size:12px}}


/* ==========================================================
   V5 — RESPONSIVE / FLUID BOOKING FORM
   The booking panel now follows the available viewport width.
   ========================================================== */

/* Desktop: fluid right column rather than a hard fixed card width */
.dr4-main-grid{
  grid-template-columns:minmax(0,1fr) clamp(284px,25vw,340px);
}
.dr4-booking-card{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:0;
  margin:0;
}
.dr4-booking-form,
.dr4-form-field,
.dr4-form-field>span:last-child{
  min-width:0;
  width:100%;
}
.dr4-form-field input,
.dr4-form-field select{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}

/* Tablet: form becomes a full-width block inside the content container */
@media (max-width:1050px){
  .dr4-main-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .dr4-booking-card{
    width:100%;
    max-width:none;
    margin:0;
  }
}

/* Mobile: comfortable tap targets, readable type, no fixed sizing */
@media (max-width:600px){
  .dr4-body-section{
    padding-left:0;
    padding-right:0;
  }

  .dr4-main-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:24px;
    width:100%;
  }

  .dr4-booking-card{
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
    padding:22px 16px 18px;
    border-radius:18px;
    min-height:0;
    box-shadow:0 8px 24px rgba(95,67,55,.08);
  }

  .dr4-booking-leaves{
    right:-12px;
    top:-18px;
    font-size:74px;
  }

  .dr4-booking-card h2{
    font-size:clamp(30px,8.2vw,38px);
    line-height:1.02;
    margin:0 0 8px;
    padding-right:34px;
  }

  .dr4-booking-card>p{
    font-size:14px;
    line-height:1.5;
    margin-bottom:18px;
    padding-right:12px;
  }

  .dr4-booking-form{
    display:grid;
    gap:12px;
    width:100%;
  }

  .dr4-form-field{
    grid-template-columns:34px minmax(0,1fr);
    gap:10px;
    min-height:58px;
    width:100%;
    padding:9px 12px;
    border-radius:11px;
  }

  .dr4-field-icon,
  .dr4-field-icon svg{
    width:22px;
    height:22px;
  }

  .dr4-form-field small{
    font-size:11px;
    line-height:1.2;
    margin-bottom:4px;
  }

  .dr4-form-field input,
  .dr4-form-field select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:22px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:15px!important;
    line-height:1.35!important;
    color:#59666f!important;
  }

  /* Prevent iOS date controls from forcing the card wider than viewport */
  .dr4-form-field input[type="datetime-local"]{
    display:block;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:14px!important;
  }

  .dr4-book-submit{
    width:100%;
    min-height:56px;
    height:auto;
    padding:12px 14px;
    border-radius:11px;
    font-size:18px;
    line-height:1.2;
  }

  .dr4-book-submit svg{
    width:20px;
    height:20px;
  }

  .dr4-form-note{
    font-size:10px;
    line-height:1.45;
    padding:0 4px;
  }

  .dr4-form-note span{
    width:18px;
    height:18px;
    margin-right:5px;
  }

  .dr4-ref-code{
    font-size:11px;
    line-height:1.4;
  }
}

/* Small phones */
@media (max-width:390px){
  .dr4-container{
    width:calc(100% - 20px);
  }
  .dr4-booking-card{
    padding:19px 13px 16px;
    border-radius:16px;
  }
  .dr4-booking-card h2{
    font-size:29px;
  }
  .dr4-booking-card>p{
    font-size:13px;
  }
  .dr4-form-field{
    grid-template-columns:30px minmax(0,1fr);
    padding:8px 10px;
  }
  .dr4-form-field input,
  .dr4-form-field select{
    font-size:14px!important;
  }
  .dr4-book-submit{
    font-size:17px;
  }
}


/* ==========================================================
   V6 — FULL-PAGE FLUID RESPONSIVE LAYOUT
   Scale the whole landing page with the viewport, not only
   the booking form. Desktop content can expand up to 1800px.
   ========================================================== */

.dr4-page{
  width:100%;
  min-width:0;
  overflow-x:hidden;
}

/* Fluid site container:
   - small screens keep safe side padding
   - desktop grows with the viewport
   - ultra-wide screens stop at 1800px for readability */
.dr4-container{
  width:min(1800px, calc(100% - clamp(24px, 6vw, 144px)));
  max-width:none;
  min-width:0;
  margin-left:auto;
  margin-right:auto;
}

/* Everything inside grids is allowed to shrink cleanly */
.dr4-header-inner,
.dr4-hero-grid,
.dr4-main-grid,
.dr4-social-grid,
.dr4-numbers-grid,
.dr4-service-grid,
.dr4-about-row,
.dr4-feature-grid,
.dr4-gallery,
.dr4-testimonial-grid,
.dr4-affiliate-inner{
  min-width:0;
}

.dr4-main-grid > *,
.dr4-hero-grid > *,
.dr4-social-grid > *,
.dr4-about-row > *{
  min-width:0;
}

/* Fluid desktop scaling */
@media (min-width:1051px){

  .dr4-header{
    height:clamp(58px,3.8vw,74px);
  }

  .dr4-header-inner{
    height:clamp(58px,3.8vw,74px);
    grid-template-columns:
      clamp(245px,17vw,320px)
      minmax(0,1fr)
      clamp(205px,15vw,280px);
    gap:clamp(16px,1.4vw,28px);
  }

  .dr4-brand{
    gap:clamp(8px,.7vw,13px);
  }

  .dr4-brand-symbol{
    width:clamp(35px,2.5vw,47px);
    height:clamp(38px,2.7vw,50px);
  }

  .dr4-brand-copy strong{
    font-size:clamp(24px,1.55vw,31px);
  }

  .dr4-brand-copy small{
    font-size:clamp(6.3px,.45vw,8px);
  }

  .dr4-nav{
    height:100%;
    gap:clamp(20px,1.8vw,38px);
  }

  .dr4-nav a{
    font-size:clamp(9.5px,.68vw,13px);
  }

  .dr4-auth-btn{
    height:clamp(32px,2.3vw,42px);
    padding-left:clamp(15px,1.1vw,22px);
    padding-right:clamp(15px,1.1vw,22px);
    font-size:clamp(8.7px,.62vw,12px);
  }

  /* Hero */
  .dr4-hero{
    height:clamp(390px,28.5vw,545px);
  }

  .dr4-hero-grid{
    height:100%;
    grid-template-columns:minmax(0,52fr) minmax(280px,29fr) minmax(190px,19fr);
  }

  .dr4-hero-copy{
    padding:
      clamp(30px,2.8vw,54px)
      clamp(18px,1.6vw,30px)
      clamp(16px,1.4vw,28px)
      0;
  }

  .dr4-kicker{
    font-size:clamp(8.5px,.58vw,11px);
    margin-bottom:clamp(8px,.65vw,13px);
  }

  .dr4-hero-copy h1{
    font-size:clamp(42px,3.35vw,68px);
    line-height:1.02;
    margin-bottom:clamp(8px,.7vw,14px);
  }

  .dr4-hero-copy>p{
    max-width:clamp(540px,37vw,710px);
    font-size:clamp(11.2px,.79vw,15px);
    line-height:1.6;
    margin-bottom:clamp(13px,1vw,20px);
  }

  .dr4-hero-buttons{
    gap:clamp(11px,.8vw,16px);
    margin-bottom:clamp(18px,1.6vw,30px);
  }

  .dr4-primary-btn,
  .dr4-secondary-btn{
    height:clamp(46px,3.05vw,58px);
    padding-left:clamp(22px,1.6vw,31px);
    padding-right:clamp(22px,1.6vw,31px);
    font-size:clamp(10px,.7vw,13.5px);
  }

  .dr4-hero-benefits{
    gap:clamp(14px,1.2vw,23px);
  }

  .dr4-benefit-icon{
    width:clamp(30px,2.1vw,40px);
    height:clamp(30px,2.1vw,40px);
  }

  .dr4-hero-benefits strong{
    font-size:clamp(9px,.64vw,12px);
  }

  .dr4-hero-benefits small{
    font-size:clamp(7.5px,.54vw,10px);
  }

  .dr4-hero-doctor{
    height:100%;
  }

  .dr4-soft-orb{
    width:clamp(325px,24vw,460px);
    height:clamp(325px,24vw,460px);
    top:clamp(30px,2.3vw,44px);
  }

  .dr4-hero-doctor img{
    height:calc(100% + 10px);
    max-height:none;
    bottom:-8px;
  }

  .dr4-hero-quote{
    height:100%;
    padding:
      clamp(48px,4vw,76px)
      clamp(6px,.8vw,16px)
      0
      clamp(24px,2vw,38px);
  }

  .dr4-script-title{
    font-size:clamp(22px,1.65vw,31px);
    margin-bottom:clamp(34px,3vw,56px);
  }

  .dr4-hero-quote blockquote{
    width:min(100%,260px);
    font-size:clamp(12px,.82vw,15.5px);
  }

  .dr4-signature{
    font-size:clamp(28px,2vw,38px);
  }

  .dr4-hero-quote>p{
    font-size:clamp(7.2px,.49vw,9px);
  }

  /* KPI strip */
  .dr4-numbers,
  .dr4-numbers-grid{
    height:clamp(64px,4.6vw,88px);
  }

  .dr4-numbers-grid>div{
    gap:clamp(13px,1vw,19px);
  }

  .dr4-number-icon{
    width:clamp(26px,1.8vw,35px);
    height:clamp(26px,1.8vw,35px);
  }

  .dr4-numbers strong{
    font-size:clamp(16px,1.05vw,21px);
  }

  .dr4-numbers small{
    font-size:clamp(7.5px,.52vw,10px);
  }

  /* Main content + booking panel */
  .dr4-body-section{
    padding:clamp(20px,1.6vw,32px) 0 clamp(12px,1.2vw,24px);
  }

  .dr4-main-grid{
    grid-template-columns:minmax(0,1fr) clamp(320px,24vw,430px);
    gap:clamp(22px,2vw,38px);
  }

  .dr4-section-heading h2,
  .dr4-social-proof h2{
    font-size:clamp(19px,1.4vw,28px);
  }

  .dr4-section-heading p{
    font-size:clamp(9px,.62vw,12px);
  }

  .dr4-service-grid{
    gap:clamp(7px,.6vw,12px);
    margin-top:clamp(12px,.9vw,18px);
  }

  .dr4-service-card{
    border-radius:clamp(8px,.65vw,12px);
  }

  .dr4-service-card img{
    height:clamp(104px,8vw,155px);
  }

  .dr4-service-card>div{
    padding:clamp(9px,.75vw,14px);
  }

  .dr4-service-card h3{
    font-size:clamp(9.4px,.68vw,13px);
    margin-bottom:clamp(5px,.4vw,8px);
  }

  .dr4-service-card p{
    font-size:clamp(7.6px,.54vw,10.5px);
  }

  .dr4-about{
    margin-top:clamp(22px,1.7vw,33px);
  }

  .dr4-about-row{
    grid-template-columns:minmax(0,1.8fr) clamp(260px,20vw,365px);
    gap:clamp(17px,1.3vw,25px);
  }

  .dr4-feature-grid article{
    padding-left:clamp(10px,1vw,18px);
    padding-right:clamp(10px,1vw,18px);
  }

  .dr4-feature-circle{
    width:clamp(34px,2.4vw,46px);
    height:clamp(34px,2.4vw,46px);
  }

  .dr4-feature-circle svg{
    width:clamp(20px,1.35vw,26px);
    height:clamp(20px,1.35vw,26px);
  }

  .dr4-feature-grid h3{
    font-size:clamp(8.7px,.62vw,11.5px);
  }

  .dr4-feature-grid p{
    font-size:clamp(7.4px,.53vw,10px);
  }

  .dr4-quote-card{
    height:clamp(144px,10.8vw,205px);
  }

  .dr4-quote-content{
    padding:
      clamp(17px,1.4vw,27px)
      0 0
      clamp(24px,1.8vw,34px);
  }

  .dr4-quote-content>span{
    font-size:clamp(30px,2.1vw,40px);
  }

  .dr4-quote-content p{
    font-size:clamp(10px,.7vw,13px);
  }

  .dr4-quote-content strong{
    font-size:clamp(20px,1.4vw,27px);
  }

  .dr4-more-btn{
    height:clamp(24px,1.8vw,34px);
    font-size:clamp(7.7px,.54vw,10px);
  }

  .dr4-booking-card{
    width:100%;
    min-height:0;
    padding:
      clamp(19px,1.45vw,28px)
      clamp(16px,1.25vw,24px)
      clamp(15px,1.25vw,24px);
    border-radius:clamp(14px,1vw,20px);
  }

  .dr4-booking-leaves{
    font-size:clamp(86px,6.3vw,120px);
  }

  .dr4-booking-card h2{
    font-size:clamp(23px,1.7vw,33px);
  }

  .dr4-booking-card>p{
    font-size:clamp(9.2px,.65vw,12.5px);
    margin-bottom:clamp(13px,1vw,19px);
  }

  .dr4-booking-form{
    gap:clamp(7px,.55vw,11px);
  }

  .dr4-form-field{
    grid-template-columns:clamp(29px,2vw,38px) minmax(0,1fr);
    gap:clamp(6px,.5vw,10px);
    min-height:clamp(43px,3.2vw,60px);
    padding:
      clamp(5px,.5vw,9px)
      clamp(9px,.75vw,14px);
    border-radius:clamp(7px,.55vw,11px);
  }

  .dr4-field-icon,
  .dr4-field-icon svg{
    width:clamp(18px,1.3vw,25px);
    height:clamp(18px,1.3vw,25px);
  }

  .dr4-form-field small{
    font-size:clamp(6.8px,.48vw,9px);
  }

  .dr4-form-field input,
  .dr4-form-field select{
    height:auto!important;
    min-height:clamp(16px,1.15vw,22px)!important;
    font-size:clamp(7.7px,.56vw,10.5px)!important;
  }

  .dr4-book-submit{
    height:clamp(39px,3vw,56px);
    font-size:clamp(9.5px,.7vw,13.5px);
  }

  .dr4-book-submit svg{
    width:clamp(14px,1vw,19px);
    height:clamp(14px,1vw,19px);
  }

  .dr4-form-note{
    font-size:clamp(6.8px,.48vw,9px);
  }

  /* Gallery / testimonial */
  .dr4-social-proof{
    padding:clamp(9px,.9vw,17px) 0 clamp(12px,1vw,20px);
  }

  .dr4-social-grid{
    gap:clamp(18px,1.5vw,28px);
  }

  .dr4-gallery{
    gap:clamp(5px,.5vw,10px);
  }

  .dr4-gallery figure{
    height:clamp(111px,8vw,155px);
    border-radius:clamp(6px,.5vw,10px);
  }

  .dr4-testimonial-grid{
    gap:clamp(7px,.55vw,11px);
  }

  .dr4-testimonial-grid article{
    height:clamp(111px,8vw,155px);
    padding:clamp(8px,.65vw,13px);
    border-radius:clamp(7px,.55vw,11px);
  }

  .dr4-reviewer{
    grid-template-columns:clamp(27px,2vw,38px) 1fr;
    gap:clamp(6px,.45vw,9px);
  }

  .dr4-review-avatar{
    width:clamp(27px,2vw,38px);
    height:clamp(27px,2vw,38px);
  }

  .dr4-reviewer p{
    font-size:clamp(6.9px,.5vw,9.5px);
  }

  .dr4-testimonial-grid article>strong{
    font-size:clamp(7.3px,.52vw,10px);
    margin-left:clamp(33px,2.45vw,47px);
  }

  .dr4-testimonial-grid article>small{
    font-size:clamp(6.2px,.45vw,8.5px);
    margin-left:clamp(33px,2.45vw,47px);
  }

  .dr4-stars{
    font-size:clamp(8px,.58vw,11px);
    margin-left:clamp(33px,2.45vw,47px);
  }

  /* Affiliate footer band */
  .dr4-affiliate-band,
  .dr4-affiliate-inner{
    height:clamp(61px,4.8vw,90px);
  }

  .dr4-network-icon{
    width:clamp(42px,3vw,58px);
    height:clamp(42px,3vw,58px);
  }

  .dr4-network-icon svg{
    width:90%;
    height:90%;
  }

  .dr4-affiliate-copy h3{
    font-size:clamp(13.5px,.95vw,18px);
  }

  .dr4-affiliate-copy p{
    font-size:clamp(7.4px,.54vw,10px);
  }

  .dr4-affiliate-login,
  .dr4-affiliate-register{
    height:clamp(32px,2.4vw,44px);
    padding-left:clamp(18px,1.3vw,25px);
    padding-right:clamp(18px,1.3vw,25px);
    font-size:clamp(8px,.58vw,11px);
  }

  .dr4-affiliate-register{
    min-width:clamp(145px,10vw,190px);
  }
}

/* Tablet keeps full use of the available viewport */
@media (min-width:601px) and (max-width:1050px){
  .dr4-container{
    width:calc(100% - clamp(28px,5vw,52px));
  }
}

/* Mobile remains edge-safe and fully fluid */
@media (max-width:600px){
  .dr4-container{
    width:calc(100% - 28px);
    max-width:none;
  }
}

@media (max-width:390px){
  .dr4-container{
    width:calc(100% - 20px);
  }
}


/* ==========================================================
   V7 — ADMIN WEBSITE CMS
   ========================================================== */
.cms-page-head{align-items:flex-start}
.cms-page-head p{max-width:680px}
.cms-head-actions{display:flex;gap:10px;flex-wrap:wrap}
.cms-form{display:grid;gap:14px;padding-bottom:90px}
.cms-notice{
  background:#fff9f4;border:1px solid #ead8ce;border-radius:14px;
  padding:14px 16px;color:#6a4a3e;font-size:13px;line-height:1.55;
}
.cms-section{
  background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;
}
.cms-section summary{
  list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;
  gap:20px;padding:17px 20px;background:#fff;user-select:none;
}
.cms-section summary::-webkit-details-marker{display:none}
.cms-section summary span:first-child{display:grid;gap:4px}
.cms-section summary strong{font-size:16px}
.cms-section summary small{font-size:12px;line-height:1.4}
.cms-chevron{font-size:22px;color:var(--muted);transition:transform .2s}
.cms-section[open] .cms-chevron{transform:rotate(180deg)}
.cms-fields{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;
  padding:18px 20px 22px;border-top:1px solid var(--line);background:#fdfcfa;
}
.cms-field{display:grid;gap:7px;min-width:0}
.cms-field>label{font-size:12px;font-weight:800;color:#4a4542}
.cms-field input[type="text"],
.cms-field textarea{
  width:100%;min-width:0;border:1px solid #dfd8d2;border-radius:10px;
  background:#fff;padding:11px 12px;font-size:13px;line-height:1.5;color:#2f3438;
}
.cms-field textarea{resize:vertical;min-height:95px}
.cms-field input:focus,.cms-field textarea:focus{
  border-color:#b77f69;box-shadow:0 0 0 3px rgba(183,127,105,.12);outline:none;
}
.cms-field-image{grid-column:span 2}
.cms-image-editor{
  display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;
  border:1px solid #e5dfda;border-radius:12px;background:#fff;padding:12px;
}
.cms-image-preview{
  width:180px;height:118px;border-radius:10px;overflow:hidden;background:#f2eee9;
  border:1px solid #eee7e2;
}
.cms-image-preview img{width:100%;height:100%;object-fit:cover;display:block}
.cms-image-controls{display:grid;align-content:start;gap:10px;min-width:0}
.cms-image-controls code{
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  background:#f6f3f0;color:#6f625b;padding:7px 9px;border-radius:8px;font-size:11px;
}
.cms-image-controls input[type="file"]{
  width:100%;border:1px dashed #cfb6a9;border-radius:9px;padding:10px;background:#fffaf7;
}
.cms-reset-image{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center!important;gap:7px!important;font-weight:600!important;color:#786b64!important}
.cms-reset-image input{width:auto!important}
.cms-savebar{
  position:fixed;left:245px;right:0;bottom:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 30px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);
  border-top:1px solid #e5ddd8;box-shadow:0 -8px 30px rgba(31,41,51,.06);
}
.cms-savebar span{font-size:12px;color:var(--muted)}
.cms-save-btn{min-width:210px}
.cms-reset-form{margin:0 0 24px}
.cms-danger-btn{background:#fff1f1;color:#a23434;border:1px solid #efcaca}
.cms-danger-btn:hover{background:#ffe7e7}
@media(max-width:1000px){
  .cms-savebar{left:0}
}
@media(max-width:760px){
  .cms-fields{grid-template-columns:1fr;padding:15px}
  .cms-field-image{grid-column:auto}
  .cms-image-editor{grid-template-columns:1fr}
  .cms-image-preview{width:100%;height:180px}
  .cms-savebar{padding:12px 16px;flex-direction:column;align-items:stretch}
  .cms-savebar span{display:none}
  .cms-save-btn{width:100%;min-width:0}
  .cms-form{padding-bottom:78px}
}


/* ==========================================================
   V8 — REVENUE MODULE
   ========================================================== */
.revenue-layout{
  grid-template-columns:minmax(300px,380px) minmax(0,1fr);
  align-items:start;
}
.revenue-list-panel{min-width:0}
.revenue-panel-head{gap:16px;flex-wrap:wrap}
.revenue-panel-head .search-form{margin-left:auto}
.revenue-form select{width:100%}
@media(max-width:1150px){
  .revenue-layout{grid-template-columns:1fr}
}
@media(max-width:720px){
  .revenue-panel-head{align-items:stretch}
  .revenue-panel-head .search-form{margin-left:0;width:100%}
  .revenue-panel-head .search-form input{min-width:0;flex:1}
}


/* ==========================================================
   V9 — MULTI-LEVEL COMMISSION + SUNBURST NETWORK
   ========================================================== */
.commission-settings-grid{
  grid-template-columns:minmax(360px,.9fr) minmax(380px,1.1fr);
  align-items:start;
}
.level-rate-editor{display:grid;gap:10px}
.level-rate-row{
  display:grid;grid-template-columns:48px minmax(0,1fr) 150px;
  gap:14px;align-items:center;border:1px solid var(--line);background:#fff;
  border-radius:13px;padding:12px 14px;
}
.level-badge{
  width:42px;height:42px;border-radius:50%;display:grid;place-items:center;
  background:#f1e5df;color:#8f5e4c;font-weight:800;
}
.level-rate-row>div{display:grid;gap:3px}
.level-rate-row>div small{font-size:11px}
.rate-input-wrap{position:relative;display:block}
.rate-input-wrap input{padding-right:34px}
.rate-input-wrap>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--muted);font-weight:700}
.commission-example{padding:20px;display:grid;gap:16px}
.commission-example-revenue,.commission-example-total{
  display:flex;justify-content:space-between;gap:14px;align-items:center;
  padding:15px 16px;border-radius:13px;background:#f8f4f1;
}
.commission-example-revenue span,.commission-example-total span{color:var(--muted);font-size:12px}
.commission-example-revenue strong,.commission-example-total strong{font-size:22px}
.commission-example-total{background:#efe2db;color:#764c3e}
.commission-config-summary{
  border:1px dashed #ceb7ab;border-radius:12px;background:#fbf7f4;padding:12px 14px;
  display:grid;gap:8px;
}
.commission-config-summary>span{font-size:12px;font-weight:800;color:#5b514c}
.commission-config-summary>div{display:flex;gap:8px;flex-wrap:wrap}
.commission-config-summary b{
  font-size:11px;padding:6px 8px;border-radius:999px;background:#efe2db;color:#805140;
}
.commission-config-summary>a{font-size:11px;color:var(--accent);font-weight:700}
.compact-summary{grid-column:1/-1}

.network-page-head{align-items:flex-start}
.network-root-form{
  display:flex;align-items:end;gap:10px;min-width:min(520px,100%);
}
.network-root-form label{flex:1}
.network-grid{
  grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);
  align-items:start;
}
.sunburst-panel{min-width:0}
.sunburst-wrap{
  position:relative;width:100%;min-height:650px;display:grid;place-items:center;
  overflow:hidden;background:
    radial-gradient(circle at 50% 50%,rgba(239,226,219,.45),transparent 48%);
}
#sunburstSvg{width:min(100%,820px);height:auto;display:block}
.sunburst-segment{cursor:pointer;transition:opacity .15s,filter .15s}
.sunburst-segment:hover{opacity:.86;filter:brightness(.97)}
.sunburst-label{
  font-size:9px;fill:#3f3530;font-family:Inter,sans-serif;pointer-events:none;
}
.sunburst-center-name{
  font-size:13px;fill:#fff;font-weight:800;font-family:Inter,sans-serif;
}
.sunburst-center-level{
  font-size:10px;fill:#e7d6ce;font-family:Inter,sans-serif;
}
.sunburst-center-revenue{
  font-size:9px;fill:#fff;font-weight:700;font-family:Inter,sans-serif;
}
.sunburst-tooltip{
  position:absolute;z-index:5;min-width:170px;max-width:250px;padding:10px 12px;
  border-radius:10px;background:rgba(39,34,32,.95);color:#fff;box-shadow:var(--shadow);
  pointer-events:none;font-size:11px;
}
.sunburst-tooltip strong,.sunburst-tooltip span{display:block}
.sunburst-tooltip strong{font-size:12px;margin-bottom:4px}
.sunburst-tooltip span{color:#e2d5cf;line-height:1.45}
.level-legend{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.level-legend span{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted)}
.level-legend i{
  width:9px;height:9px;border-radius:50%;display:block;background:#a86b56;
}
.level-legend span:nth-child(2) i{background:#c28f78}
.level-legend span:nth-child(3) i{background:#d7ab96}
.level-legend span:nth-child(4) i{background:#b67c68}
.level-legend span:nth-child(5) i{background:#8e5c4d}
.network-note{padding:12px 18px 18px;color:var(--muted);font-size:11px;line-height:1.55}

@media(max-width:1250px){
  .commission-settings-grid,.network-grid{grid-template-columns:1fr}
  .network-root-form{min-width:0}
}
@media(max-width:720px){
  .level-rate-row{grid-template-columns:42px minmax(0,1fr);gap:10px}
  .rate-input-wrap{grid-column:1/-1}
  .network-root-form{flex-direction:column;align-items:stretch;width:100%}
  .sunburst-wrap{min-height:430px}
}


/* ==========================================================
   V10 — UNLIMITED LEVEL MANAGER
   ========================================================== */
.commission-unlimited-note{
  display:flex;align-items:center;gap:14px;margin-bottom:18px;padding:15px 18px;
  border:1px solid #e3d5ce;border-radius:15px;background:#fff9f5;color:#64483d;
}
.commission-unlimited-note>strong{
  width:46px;height:46px;border-radius:50%;display:grid;place-items:center;
  background:#efe0d8;color:#8a5847;font-size:28px;font-family:Georgia,serif;
}
.commission-unlimited-note>span{display:grid;gap:4px;font-size:13px;font-weight:700}
.commission-unlimited-note small{font-size:11px;font-weight:500;color:var(--muted)}
.add-level-inline{display:flex;align-items:end;gap:8px}
.add-level-inline label{display:grid;gap:4px}
.add-level-inline label>span{font-size:10px;color:var(--muted)}
.add-level-inline input{width:110px}
.level-manager{display:grid;gap:10px;padding:18px 20px}
.level-manager-row{
  display:grid;grid-template-columns:48px minmax(120px,1fr) minmax(260px,auto) auto;
  gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;
  padding:12px 14px;background:#fff;
}
.level-manager-copy{display:grid;gap:3px}
.level-manager-copy small{font-size:11px}
.level-edit-form{display:flex;align-items:center;gap:8px}
.level-edit-form .rate-input-wrap{width:130px}
.level-delete-btn{
  background:#fff3f3;color:#a13a3a;border:1px solid #efcccc;
}
.level-delete-btn:hover{background:#ffe8e8}
.level-delete-btn:disabled{opacity:.45;cursor:not-allowed}

/* ==========================================================
   V10 — BRANCH NETWORK
   ========================================================== */
.network-tree-panel{min-width:0}
.network-tree-head{align-items:flex-start;gap:18px}
.network-tree-head>div:first-child{display:grid;gap:5px}
.network-tree-head small{font-size:11px;color:var(--muted)}
.network-tree-scroll{
  overflow:auto;min-height:520px;max-height:760px;padding:24px 24px 40px;
  background:
    radial-gradient(circle at 10% 0%,rgba(239,226,219,.55),transparent 38%),
    #fcfbf9;
}
.branch-tree,.branch-tree ul{list-style:none;margin:0;padding:0}
.branch-item{position:relative;margin:8px 0 8px 30px}
.root-item{margin-left:0}
.branch-children{
  position:relative;margin-left:34px!important;padding-left:26px!important;
}
.branch-children::before{
  content:"";position:absolute;left:7px;top:0;bottom:16px;width:1px;background:#d8c6bd;
}
.branch-children>.branch-item::before{
  content:"";position:absolute;left:-19px;top:27px;width:19px;height:1px;background:#d8c6bd;
}
.branch-node{
  display:grid;grid-template-columns:32px 38px minmax(160px,1fr) auto;
  gap:10px;align-items:center;width:min(100%,650px);
  padding:9px 12px;border:1px solid #e4dad4;border-radius:13px;background:#fff;
  box-shadow:0 5px 16px rgba(62,46,39,.045);
}
.root-node{background:#5d463e;color:#fff;border-color:#5d463e;box-shadow:0 10px 24px rgba(62,46,39,.16)}
.branch-toggle{
  width:28px;height:28px;padding:0;border-radius:8px;border:1px solid #d2b9ad;
  background:#fff7f2;color:#8a5847;font-size:20px;line-height:1;cursor:pointer;
  display:grid;place-items:center;
}
.root-node .branch-toggle{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.35);color:#fff}
.branch-toggle-empty{border-color:transparent;background:transparent;cursor:default}
.branch-avatar{
  width:36px;height:36px;border-radius:50%;display:grid;place-items:center;
  background:#efe0d8;color:#865542;font-size:10px;font-weight:800;
}
.root-node .branch-avatar{background:#fff;color:#69483d}
.branch-main{display:grid;gap:3px;min-width:0}
.branch-main strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.branch-main small{font-size:9px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.root-node .branch-main small{color:#dfd0ca}
.branch-meta{display:grid;gap:2px;text-align:right;white-space:nowrap}
.branch-meta b{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#9b6653}
.branch-meta small{font-size:10px;color:#4f4946}
.root-node .branch-meta b,.root-node .branch-meta small{color:#fff}
.branch-loading,.branch-empty{
  margin-left:20px;padding:10px 12px;font-size:10px;color:var(--muted);
  border-left:2px solid #e5d7d0;
}

/* ==========================================================
   V10 — ORDERS + CUSTOMER FINDER
   ========================================================== */
.orders-layout{
  grid-template-columns:minmax(330px,420px) minmax(0,1fr);
  align-items:start;
}
.orders-list-panel{min-width:0}
.orders-panel-head{gap:14px;flex-wrap:wrap}
.orders-panel-head .search-form{margin-left:auto}
.customer-finder{position:relative;display:grid;gap:9px}
.customer-search-results{
  position:absolute;top:66px;left:0;right:0;z-index:20;
  max-height:310px;overflow:auto;border:1px solid #dfd2cb;border-radius:12px;
  background:#fff;box-shadow:0 18px 45px rgba(42,32,28,.14);
}
.customer-result{
  width:100%;border:0;border-bottom:1px solid #eee7e2;background:#fff;
  text-align:left;padding:11px 13px;display:grid;gap:3px;cursor:pointer;color:var(--ink);
}
.customer-result:hover{background:#fbf5f2}
.customer-result:last-child{border-bottom:0}
.customer-result strong{font-size:12px}
.customer-result span{font-size:10px;color:#5f5a57}
.customer-result small{font-size:9px;color:var(--muted)}
.customer-result-empty{padding:14px;font-size:11px;color:var(--muted)}
.selected-customer-card{
  position:relative;padding:11px 42px 11px 13px;border:1px solid #b9d7c5;
  background:#f2faf5;border-radius:12px;display:grid;gap:3px;
}
.selected-customer-card>span{font-size:9px;color:#51705d;text-transform:uppercase;font-weight:800;letter-spacing:.06em}
.selected-customer-card strong{font-size:13px;color:#315840}
.selected-customer-card small{font-size:10px;color:#66806f}
.text-action{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  width:26px;height:26px;border-radius:50%;border:1px solid #c8d9ce;background:#fff;
  cursor:pointer;color:#476452;font-size:17px;
}
.new-customer-fields{
  display:grid;gap:12px;padding:13px;border-radius:12px;background:#fff9f4;
  border:1px dashed #d9bcae;
}
.new-customer-note{
  font-size:10px;line-height:1.5;color:#7b594c;background:#f6ebe5;padding:9px 10px;border-radius:9px;
}
.order-create-form .commission-config-summary small{color:var(--muted);line-height:1.5}

/* Responsive */
@media(max-width:1250px){
  .orders-layout{grid-template-columns:1fr}
}
@media(max-width:1050px){
  .level-manager-row{
    grid-template-columns:44px minmax(100px,1fr);
  }
  .level-edit-form{grid-column:1/-1}
  .level-manager-row>form:last-child{grid-column:1/-1}
  .add-level-inline{width:100%;justify-content:flex-end}
}
@media(max-width:720px){
  .add-level-inline{align-items:stretch;flex-direction:column}
  .add-level-inline input{width:100%}
  .level-edit-form{align-items:stretch;flex-direction:column}
  .level-edit-form .rate-input-wrap{width:100%}
  .network-tree-scroll{padding:18px 10px 30px;min-height:420px}
  .branch-item{margin-left:16px}
  .branch-children{margin-left:20px!important;padding-left:18px!important}
  .branch-node{grid-template-columns:28px 32px minmax(120px,1fr);width:100%}
  .branch-meta{grid-column:3;text-align:left}
  .orders-panel-head .search-form{margin-left:0;width:100%}
}


/* ==========================================================
   V11 — THANK-YOU COPY + SHARE EXPERIENCE
   ========================================================== */
.thankyou-center{
  min-height:100vh;
  padding:32px 18px;
  background:
    radial-gradient(circle at 50% 15%,rgba(244,226,218,.62),transparent 34%),
    #f7f5f2;
}
.thankyou-card{
  width:min(100%,460px);
  padding:30px 28px 26px;
}
.thankyou-card h1{
  margin:10px 0 8px;
}
.thankyou-message{
  line-height:1.6;
}
.thankyou-share-box{
  display:grid;
  gap:10px;
  margin-top:18px;
}
.thankyou-share-box>strong{
  letter-spacing:.08em;
}
.thankyou-link-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:stretch;
}
.thankyou-link-row input{
  min-width:0;
  width:100%;
}
.thankyou-copy-btn{
  min-width:116px;
  border:1px solid #c7a899;
  background:#fff;
  color:#8b5745;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  white-space:nowrap;
}
.thankyou-copy-btn svg,
.thankyou-share-btn svg{
  width:18px;
  height:18px;
  flex:0 0 auto;
}
.thankyou-copy-btn.is-copied{
  border-color:#8bb99c;
  background:#eef8f2;
  color:#35714c;
}
.thankyou-share-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:3px;
}
.thankyou-share-btn,
.thankyou-home-btn{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.thankyou-action-message{
  padding:9px 10px;
  border-radius:9px;
  background:#eef8f2;
  border:1px solid #c7dfd0;
  color:#36654a;
  font-size:11px;
  line-height:1.45;
}

@media(max-width:560px){
  .thankyou-center{
    padding:20px 12px;
    align-items:flex-start;
  }
  .thankyou-card{
    width:100%;
    padding:24px 16px 20px;
    margin-top:5vh;
  }
  .thankyou-card h1{
    font-size:clamp(26px,8vw,34px);
  }
  .thankyou-link-row{
    grid-template-columns:1fr;
  }
  .thankyou-copy-btn{
    width:100%;
    min-height:44px;
  }
  .thankyou-share-actions{
    grid-template-columns:1fr;
  }
}


/* ==========================================================
   V12 — CANONICAL REFERRAL RELATIONSHIPS
   ========================================================== */
.referral-management-panel{min-width:0}
.referral-management-grid{
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(340px,1.15fr);
  gap:18px;
  padding:18px 20px 22px;
}
.referral-current-card{
  border:1px solid var(--line);
  border-radius:13px;
  background:#fbfaf8;
  padding:4px 14px;
}
.referral-correction-form{
  border:1px solid #e5dad4;
  border-radius:13px;
  background:#fff;
  padding:14px;
}
.referral-correction-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.referral-remove-btn{
  background:#fff2f2;
  color:#9d3939;
  border:1px solid #eecaca;
}
.referral-health{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.referral-health-ok{
  color:#326647;
  background:#edf8f1;
  border:1px solid #c7dfd0;
}
.referral-health-issue{
  color:#9a3737;
  background:#fff1f1;
  border:1px solid #efcaca;
}
.referral-integrity-warning{
  margin:10px 0;
  padding:9px 10px;
  border-radius:9px;
  color:#8f3d35;
  background:#fff1ee;
  font-size:11px;
  line-height:1.45;
}
@media(max-width:900px){
  .referral-management-grid{grid-template-columns:1fr}
}

/* ==========================================================
   V13 — RBAC, ACCOUNTING, REPORTS, CUSTOMER 360
   ========================================================== */
.sidebar-account{
  margin:14px 14px 8px;padding:11px 12px;border-radius:12px;
  background:rgba(255,255,255,.07);display:grid;gap:3px;
}
.sidebar-account strong{font-size:12px;color:#fff}
.sidebar-account small{font-size:9px;color:rgba(255,255,255,.65)}
.sidebar-section-label{
  display:block;margin:15px 12px 5px;font-size:8px;font-weight:800;
  letter-spacing:.13em;text-transform:uppercase;color:rgba(255,255,255,.42)
}
.page-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.customer-360-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.metric-date{font-size:14px!important;line-height:1.35!important}
.panel-badge{
  display:inline-flex;padding:5px 8px;border-radius:999px;background:#f1e6e0;
  color:#7b5344;font-size:9px;font-weight:800;white-space:nowrap
}
.single-referral-grid{grid-template-columns:minmax(0,.9fr) minmax(340px,1.1fr)}
.compact-form{padding-bottom:12px}
.compact-table{max-height:260px;overflow:auto}
.portal-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.member-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.portal-withdraw-form button:disabled{opacity:.45;cursor:not-allowed}
.account-layout{grid-template-columns:minmax(300px,380px) minmax(0,1fr);align-items:start}
.account-list-panel{min-width:0}
.role-badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800}
.role-admin{background:#efe0d8;color:#7b4d3d}.role-staff{background:#edf2fb;color:#3d5b85}.role-customer{background:#edf8f1;color:#35674a}
.inline-password-form{display:flex;gap:6px;min-width:220px}.inline-password-form input{min-width:130px}
.btn-sm{padding:7px 9px!important;font-size:9px!important;min-height:auto!important}
.role-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.role-tab{padding:9px 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:11px;font-weight:700}
.role-tab.active{background:#865642;color:#fff;border-color:#865642}
.permissions-form{display:grid;gap:16px}
.permission-category{margin:0}
.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:18px}
.permission-item{display:flex!important;gap:10px;align-items:flex-start;border:1px solid var(--line);padding:12px;border-radius:12px;background:#fff;cursor:pointer}
.permission-item input{width:17px;height:17px;margin-top:2px;flex:0 0 auto}
.permission-item span{display:grid;gap:4px}.permission-item strong{font-size:11px}.permission-item small{font-size:9px;line-height:1.5;color:var(--muted)}
.sticky-save{position:sticky;bottom:12px;display:flex;justify-content:flex-end;z-index:5}.sticky-save .btn{box-shadow:var(--shadow)}
.break-code{white-space:normal;word-break:break-all}
.date-range-form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.date-range-form label{display:grid;gap:4px;font-size:9px;color:var(--muted)}.date-range-form input,.date-range-form select{min-width:130px}
.system-report-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.withdrawal-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.withdrawal-metrics .metric small{display:block;margin-top:5px}
.withdrawal-action-form{display:grid;gap:5px;min-width:180px}.withdrawal-action-form input,.withdrawal-action-form select{min-width:160px}
.status.requested{background:#fff4dd;color:#8b651a}.status.approved{background:#edf6ff;color:#285f8e}.status.rejected{background:#fff0f0;color:#9b3636}.status.paid{background:#edf8f1;color:#35674a}

@media(max-width:1250px){
  .customer-360-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .account-layout{grid-template-columns:1fr}
  .member-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .system-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .withdrawal-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .single-referral-grid,.portal-grid.two{grid-template-columns:1fr}
  .permission-grid{grid-template-columns:1fr}
  .page-head-actions{justify-content:flex-start}
}
@media(max-width:720px){
  .customer-360-metrics,.member-metrics,.system-report-metrics,.withdrawal-metrics{grid-template-columns:1fr}
  .date-range-form{width:100%;align-items:stretch}.date-range-form label,.date-range-form input,.date-range-form select,.date-range-form .btn{width:100%}
  .inline-password-form{min-width:0;flex-direction:column}.inline-password-form input{min-width:0;width:100%}
}

/* V14 */
.row-actions{display:flex;gap:6px;align-items:center}.row-actions form{margin:0}.btn-sm{padding:7px 10px;font-size:11px}.btn-danger{background:#fff1f1;color:#a13d3d;border:1px solid #efcaca}.page-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.customer-edit-form{max-width:920px;padding:20px}.commission-rule-box{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fbf8f6}.order-items-editor{border:1px solid var(--line);border-radius:14px;padding:12px}.order-item-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 130px 34px;gap:8px;align-items:center;margin:8px 0}.order-item-row .removeItem{border:1px solid #e3c8c8;background:#fff3f3;color:#9b4343;border-radius:8px;height:38px}.order-total-line{display:flex;justify-content:space-between;padding:12px 4px 2px;border-top:1px dashed var(--line);margin-top:10px}.order-total-line strong{font-size:20px}.member-metrics .metric small{display:block;margin-top:4px;color:var(--muted)}@media(max-width:720px){.order-item-row{grid-template-columns:1fr 70px}.order-item-row .lineTotal{grid-column:1}.order-item-row .removeItem{grid-column:2}.page-head-actions{width:100%}}

/* ==========================================================
   V15 — PRODUCT/SERVICE MULTI-LEVEL COMMISSION MANAGER
   ========================================================== */
.product-edit-panel,.product-commission-panel,.system-fallback-panel{margin-bottom:18px}
.product-main-form{padding:18px 20px 22px}
.product-commission-head{align-items:flex-start;gap:16px}
.product-commission-head>div{display:grid;gap:5px}
.product-commission-head p,.system-fallback-panel .panel-head p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.unlimited-level-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;background:#efe2db;color:#7e5142;font-weight:800;font-size:11px;white-space:nowrap}
.product-rule-explainer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px 20px 0}
.product-rule-explainer>div{display:grid;gap:4px;padding:12px;border:1px solid #e5d9d2;border-radius:12px;background:#fbf8f6}
.product-rule-explainer b{font-size:11px;color:#714b3e}
.product-rule-explainer span{font-size:10px;color:var(--muted);line-height:1.45}
.product-rule-add-wrap{margin:16px 20px;padding:15px;border:1px dashed #cdb3a7;border-radius:13px;background:#fff9f5}
.product-rule-add-wrap h3{margin:0 0 10px;font-size:14px}
.product-rule-add-form{display:grid;grid-template-columns:120px minmax(180px,1fr) minmax(160px,1fr) auto;gap:10px;align-items:end}
.product-rule-add-form label{display:grid;gap:5px}
.form-help{display:block;margin-top:9px;color:var(--muted);font-size:10px;line-height:1.5}
.product-rule-table input,.product-rule-table select{min-width:100px}
.product-rule-table .rule-level-input{width:86px;min-width:86px}
.product-rule-placeholder .empty-state-copy{padding:22px;color:var(--muted);font-size:12px;line-height:1.6}
@media(max-width:1000px){
  .product-rule-explainer{grid-template-columns:1fr}
  .product-rule-add-form{grid-template-columns:1fr 1fr}
  .product-rule-add-form .btn{width:100%}
}
@media(max-width:650px){
  .product-rule-add-form{grid-template-columns:1fr}
  .unlimited-level-badge{align-self:flex-start}
}

/* ==========================================================
   V16 — ORDER FREEFORM ITEMS + DISCOUNT
   ========================================================== */
.order-item-editor-head{align-items:flex-start;gap:12px}
.order-item-editor-head>div{display:grid;gap:4px}
.order-item-editor-head small{font-size:10px;color:var(--muted);line-height:1.45}
.order-item-columns{
  display:grid;grid-template-columns:minmax(150px,.9fr) minmax(180px,1.1fr) 70px 120px 110px 34px;
  gap:8px;padding:4px 0 2px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em
}
.order-item-row-v16{
  grid-template-columns:minmax(150px,.9fr) minmax(180px,1.1fr) 70px 120px 110px 34px;
}
.order-item-row-v16 input,.order-item-row-v16 select{min-width:0}
.order-item-row-v16 .lineTotal{text-align:right;white-space:nowrap}
.order-discount-box{margin-top:14px;padding:12px;border-radius:12px;background:#fbf8f5;border:1px solid var(--line)}
.order-summary-lines{display:grid;gap:6px;margin-top:12px}
.order-summary-lines>div{display:flex;justify-content:space-between;align-items:center;padding:4px 4px;font-size:12px}
.order-summary-lines>div>strong{font-size:13px}
.order-summary-lines .order-total-line{padding-top:12px}
.order-summary-lines .order-total-line strong{font-size:20px}
@media(max-width:980px){
  .order-item-columns{display:none}
  .order-item-row-v16{grid-template-columns:1fr 1fr 80px 120px}
  .order-item-row-v16 .lineTotal{grid-column:1/4;text-align:left}
  .order-item-row-v16 .removeItem{grid-column:4}
}
@media(max-width:620px){
  .order-item-row-v16{grid-template-columns:1fr 86px}
  .order-item-row-v16 .productSelect,.order-item-row-v16 .itemNameInput,.order-item-row-v16 .priceInput{grid-column:1/-1}
  .order-item-row-v16 .qtyInput{grid-column:1}
  .order-item-row-v16 .lineTotal{grid-column:1;text-align:left}
  .order-item-row-v16 .removeItem{grid-column:2;grid-row:4/6;height:100%}
}

/* ==========================================================
   V16.1 — ORDER & REVENUE UI REBUILD
   Fixes the create-order layout overflow introduced when V16
   added six-column free-form items inside the old narrow sidebar.
   ========================================================== */
.orders-page-head-v161{margin-bottom:18px}
.orders-metrics-v161{margin-bottom:18px}
.order-create-panel-v161{margin-bottom:18px;overflow:visible}
.order-create-head-v161{align-items:flex-start}
.order-create-head-v161>div{display:grid;gap:5px}
.order-create-head-v161 p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.order-form-v161{display:grid;gap:18px;padding:20px}
.order-form-top-v161{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.order-form-card-v161{display:grid;gap:13px;border:1px solid var(--line);border-radius:15px;background:#fff;padding:16px;min-width:0}
.order-form-card-title-v161{display:flex;align-items:flex-start;gap:10px;margin-bottom:2px}
.order-form-card-title-v161.no-margin{margin:0}
.order-form-card-title-v161>div{display:grid;gap:3px}
.order-form-card-title-v161 strong{font-size:14px;color:var(--ink)}
.order-form-card-title-v161 small{font-size:10px;color:var(--muted);line-height:1.45}
.order-step-v161{width:28px;height:28px;border-radius:9px;background:#efe2db;color:#7a4f40;display:grid;place-items:center;font-weight:800;font-size:11px;flex:0 0 auto}
.customer-finder-v161{min-width:0}
.selected-customer-card-v161{min-height:76px}
.order-payment-grid-v161{align-items:start}
.order-form-v161 textarea{width:100%;resize:vertical;min-height:78px}
.order-items-editor-v161{padding:0;border:1px solid var(--line);border-radius:15px;background:#fff;overflow:hidden}
.order-items-head-v161{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid var(--line);background:#fbf9f7}
.order-items-table-v161{padding:12px 14px 4px;overflow-x:auto}
.order-item-columns-v161{min-width:850px;grid-template-columns:minmax(160px,.95fr) minmax(210px,1.2fr) 74px 130px 120px 40px;padding:6px 8px;color:#83756e}
.order-item-rows-v161{display:grid;gap:8px;min-width:850px}
.order-item-row-v161{display:grid;grid-template-columns:minmax(160px,.95fr) minmax(210px,1.2fr) 74px 130px 120px 40px;gap:8px;align-items:end;margin:0;padding:10px 8px;border:1px solid #eee5e0;border-radius:11px;background:#fff}
.order-item-cell-v161{display:grid!important;gap:4px;min-width:0;margin:0!important}
.order-item-cell-v161 input,.order-item-cell-v161 select{width:100%;min-width:0}
.order-item-mobile-label-v161{display:none;font-size:9px;color:var(--muted);font-weight:700}
.total-cell-v161{align-self:stretch;display:flex!important;flex-direction:column;justify-content:flex-end;align-items:flex-end;padding-bottom:10px}
.total-cell-v161 .lineTotal{font-size:12px;white-space:nowrap}
.remove-cell-v161{display:flex;align-items:flex-end;justify-content:center;padding-bottom:2px}
.order-item-row-v161 .removeItem{width:36px;height:38px;border:1px solid #ebcccc;background:#fff4f4;color:#a04141;border-radius:9px;font-size:18px;cursor:pointer}
.order-item-row-v161 .removeItem:hover{background:#ffe9e9}
.order-discount-summary-v161{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:14px;padding:14px 18px 18px;border-top:1px solid var(--line);background:#fcfbfa}
.order-discount-box-v161{margin:0;padding:14px;background:#fff}
.order-section-mini-title-v161{font-size:11px;font-weight:800;color:#744f41;margin-bottom:10px;text-transform:uppercase;letter-spacing:.04em}
.order-summary-card-v161{border:1px solid #e2d4cd;border-radius:12px;background:#fff;padding:12px 14px;display:flex;align-items:center}
.order-summary-lines-v161{width:100%;margin:0}
.order-summary-lines-v161>div{padding:5px 2px}
.order-submit-bar-v161{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:13px;background:#f6efeb;border:1px solid #eadbd3}
.order-submit-bar-v161>div{display:grid;gap:4px}
.order-submit-bar-v161 strong{font-size:12px;color:#66493f}
.order-submit-bar-v161 small{font-size:10px;color:var(--muted);line-height:1.45}
.order-submit-btn-v161{min-width:260px;white-space:nowrap}
.orders-list-panel-v161{min-width:0}
.orders-panel-head-v161{gap:16px;flex-wrap:wrap}
.orders-panel-head-v161>div{display:grid;gap:4px}
.orders-panel-head-v161>div small{font-size:10px;color:var(--muted)}
.orders-panel-head-v161 .search-form{margin-left:auto}
.orders-history-table-v161{max-width:100%;overflow-x:auto}
.orders-history-table-v161 table{min-width:1180px}

@media(max-width:1100px){
  .order-form-top-v161{grid-template-columns:1fr}
  .order-discount-summary-v161{grid-template-columns:1fr}
}

@media(max-width:820px){
  .order-form-v161{padding:14px}
  .order-items-head-v161{align-items:flex-start;flex-direction:column}
  .order-items-head-v161 .btn{width:100%}
  .order-items-table-v161{overflow:visible;padding:10px}
  .order-item-columns-v161{display:none}
  .order-item-rows-v161{min-width:0}
  .order-item-row-v161{grid-template-columns:1fr 1fr;min-width:0;padding:12px}
  .order-item-mobile-label-v161{display:block}
  .product-cell-v161,.name-cell-v161{grid-column:1/-1}
  .qty-cell-v161{grid-column:1}
  .price-cell-v161{grid-column:2}
  .total-cell-v161{grid-column:1;align-items:flex-start;padding:4px 0 0}
  .remove-cell-v161{grid-column:2;justify-content:flex-end;padding:0}
  .order-item-row-v161 .removeItem{width:100%;max-width:90px}
  .order-submit-bar-v161{align-items:stretch;flex-direction:column}
  .order-submit-btn-v161{width:100%;min-width:0}
  .orders-panel-head-v161{align-items:stretch}
  .orders-panel-head-v161 .search-form{margin-left:0;width:100%}
  .orders-panel-head-v161 .search-form input{min-width:0;flex:1}
}

@media(max-width:560px){
  .order-form-v161{padding:10px;gap:12px}
  .order-form-card-v161{padding:12px}
  .order-items-head-v161{padding:13px}
  .order-discount-summary-v161{padding:10px}
  .order-item-row-v161{grid-template-columns:1fr}
  .product-cell-v161,.name-cell-v161,.qty-cell-v161,.price-cell-v161,.total-cell-v161,.remove-cell-v161{grid-column:1}
  .remove-cell-v161{justify-content:stretch}
  .order-item-row-v161 .removeItem{max-width:none;width:100%}
  .form-grid-2.order-payment-grid-v161{grid-template-columns:1fr}
}

/* ==========================================================
   V18 — CUSTOMER PROFILE, WALLET HISTORY & DASHBOARD GROUPS
   ========================================================== */
.portal-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.portal-head-actions form{margin:0}
.member-profile-head{align-items:center;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px}
.member-avatar-wrap{display:flex;align-items:center;justify-content:center}
.member-avatar,.admin-customer-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 8px 24px rgba(57,42,35,.14);background:#eaded8}
.member-avatar-fallback{display:grid;place-items:center;font-family:Georgia,serif;font-size:28px;font-weight:700;color:#815947;background:linear-gradient(135deg,#efe1d9,#f8f1ed)}
.member-profile-copy{min-width:0}
.member-profile-copy h1{margin-top:4px}
.payment-summary,.profile-required-notice,.payment-ready-state,.profile-lock-notice{padding:12px 14px;border-radius:12px;font-size:11px;line-height:1.55}
.payment-summary{display:grid;gap:3px;background:#f4faf6;border:1px solid #cfe3d5;color:#315e42}
.profile-required-notice{background:#fff7ec;border:1px solid #ecd5ad;color:#7b5a25}
.payment-ready-state{background:#eff9f3;border:1px solid #c7dfd0;color:#326647}
.profile-lock-notice{background:#f5f2ef;border:1px solid #ddd2cc;color:#65564f}
.withdraw-method{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}
.withdraw-method.direct{background:#eef5ff;color:#3e5f8d;border:1px solid #cbdaf0}
.withdraw-method.order{background:#fff4e8;color:#8a5b23;border:1px solid #edd1ad}
.profile-layout{display:grid;grid-template-columns:minmax(250px,.65fr) minmax(0,1.35fr);gap:18px;align-items:start;margin-bottom:18px}
.profile-avatar-stage{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 18px}
.profile-avatar-large{width:148px;height:148px;border-radius:50%;object-fit:cover;border:5px solid #fff;box-shadow:0 16px 40px rgba(62,45,38,.14)}
.profile-avatar-stage h2{margin:18px 0 4px;font-family:Georgia,serif;font-size:24px}
.profile-avatar-stage p{margin:0;color:var(--muted);font-size:11px}
.profile-account-pill{margin-top:12px;padding:7px 10px;border-radius:999px;background:#f2ebe7;color:#735141;font-size:10px;font-weight:700}
.form-section-title{display:flex;align-items:end;justify-content:space-between;gap:10px;padding-top:8px;border-top:1px solid var(--line);margin-top:4px}
.form-section-title>span{font-weight:800;font-size:12px}.form-section-title small{font-size:9px;color:var(--muted)}
.account-current{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 18px;background:#faf7f5;border-bottom:1px solid var(--line)}
.account-current span{font-size:10px;color:var(--muted)}.account-current strong{font-size:14px}
.admin-avatar-preview{display:flex;align-items:center;gap:14px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#faf8f6}
.admin-avatar-preview img{width:70px;height:70px;border-radius:50%;object-fit:cover}
.customer-title-with-avatar{display:flex;align-items:center;gap:14px;min-width:0}
.dashboard-function-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 22px}
.dashboard-group{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 5px 18px rgba(54,42,36,.035)}
.dashboard-group-head{display:flex;align-items:flex-start;gap:11px;margin-bottom:12px}
.dashboard-group-head>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#efe2db;color:#8b5b49;font-size:10px;font-weight:800}
.dashboard-group-head>div{display:grid;gap:3px}.dashboard-group-head strong{font-size:13px}.dashboard-group-head small{font-size:9px;color:var(--muted)}
.dashboard-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.dashboard-action-grid a{display:flex;align-items:center;justify-content:space-between;gap:8px;text-decoration:none;color:var(--ink);padding:10px 11px;border:1px solid #ebe3de;border-radius:10px;background:#fcfbfa;font-size:10px;font-weight:700}
.dashboard-action-grid a:hover{background:#f7efeb;border-color:#dec9be}.dashboard-action-grid b{color:#9b654f}
.sidebar-section-label.first{margin-top:2px}
.system-report-metrics .metric small{display:block;margin-top:5px;font-size:8px;line-height:1.4;color:var(--muted);font-weight:500}
@media(max-width:950px){.profile-layout,.dashboard-function-groups{grid-template-columns:1fr}.member-profile-head{grid-template-columns:auto 1fr}.member-profile-head .page-head-actions{grid-column:1/-1}.account-security-grid{grid-template-columns:1fr!important}}
@media(max-width:620px){.portal-head{align-items:flex-start;gap:10px}.portal-head-actions{width:100%}.portal-head-actions .btn{flex:1}.member-profile-head{grid-template-columns:1fr;text-align:center}.member-avatar-wrap{justify-content:center}.member-profile-head .page-head-actions{justify-content:center}.dashboard-action-grid{grid-template-columns:1fr}.customer-title-with-avatar{align-items:flex-start}.admin-customer-avatar{width:58px;height:58px}.profile-avatar-large{width:120px;height:120px}}
.customer-list-identity{display:flex;align-items:center;gap:9px;min-width:170px}.customer-list-identity>img,.customer-list-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:0 0 auto}.customer-list-avatar{display:grid;place-items:center;background:#efe3dd;color:#865846;font-size:12px;font-weight:800}.customer-list-identity>span:last-child{display:grid;gap:2px}

/* =============================================================
   V19 — grouped admin navigation + customer system report
   ============================================================= */
.sidebar-nav-groups{align-content:start}
.sidebar-nav-group{display:grid;gap:5px;align-content:start;min-width:0}
.sidebar-nav-group .sidebar-section-label{margin-top:8px}
.sidebar-nav-group:first-child .sidebar-section-label{margin-top:2px}

/* Mỗi nhóm chức năng Dashboard là một cột riêng; các mục bên trong xếp dọc. */
.dashboard-function-groups{grid-template-columns:repeat(auto-fit,minmax(205px,1fr));align-items:stretch}
.dashboard-group{height:100%}
.dashboard-action-grid{grid-template-columns:1fr}

.member-system-report{margin:18px 0}
.report-panel-head{align-items:flex-end;gap:18px;flex-wrap:wrap}
.report-panel-head>div:first-child{display:grid;gap:4px;max-width:620px}
.report-panel-head p{margin:0;color:var(--muted);font-size:10px;line-height:1.55}
.member-report-metrics{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px}
.member-report-metrics .metric small{display:block;margin-top:5px;font-size:8px;line-height:1.45;color:var(--muted);font-weight:500}

@media(max-width:1100px){.member-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.member-report-metrics{grid-template-columns:1fr}.report-panel-head{align-items:stretch}}
@media(max-width:950px){.dashboard-function-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.dashboard-function-groups{grid-template-columns:1fr}}


/* =============================================================
   V19.1 — MOBILE USERNAME CONFIRM BUTTON FIX
   ============================================================= */
.username-change-form{min-width:0}
.username-change-note{display:block;line-height:1.55}
.username-confirm-bar{display:flex;justify-content:flex-start;align-items:center;min-width:0}
.username-confirm-btn{min-height:44px;white-space:normal;text-align:center}
@media(max-width:700px){
  .account-security-grid .panel{overflow:visible}
  .account-security-grid .stack-form{padding:16px}
  .username-change-form{gap:12px}
  .username-change-form label,.username-change-form input{min-width:0;width:100%}
  .username-confirm-bar{width:100%;padding-top:2px}
  .username-confirm-btn{display:flex!important;width:100%!important;min-width:0!important;min-height:48px;padding:13px 14px!important;border-radius:12px;font-size:13px;line-height:1.35;visibility:visible!important;opacity:1!important}
}

/* =============================================================
   V19.2 — CUSTOMER AUTH REPAIR + COMPLETE MOBILE PROFILE UI
   ============================================================= */
.profile-head-actions{min-width:0}
.portal-logout-form{margin:0;min-width:0}
.portal-logout-btn{white-space:nowrap}
.profile-page,.profile-page *{box-sizing:border-box}
.profile-page .panel{min-width:0}
.profile-page .stack-form label{min-width:0}
.profile-page input,.profile-page select,.profile-page textarea{max-width:100%;min-width:0}
.profile-page textarea{resize:vertical}
.profile-page input[type="file"]{width:100%;overflow:hidden}
.account-current strong{min-width:0;overflow-wrap:anywhere;word-break:break-word;text-align:right}

@media(max-width:700px){
  /* The member header now becomes a deliberate mobile toolbar instead of trying
     to squeeze brand + actions onto one row. This also guarantees Logout is visible. */
  .portal-head{
    flex-direction:column;
    align-items:stretch!important;
    gap:12px!important;
    padding:12px 14px!important;
  }
  .portal-head>.brand{
    width:100%;
    min-width:0;
  }
  .portal-head-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px!important;
    align-items:stretch;
  }
  .portal-head-actions>a,
  .portal-head-actions>form,
  .portal-head-actions .btn{
    width:100%!important;
    min-width:0!important;
  }
  .portal-head-actions>form{display:block!important;margin:0!important}
  .portal-head-actions .btn{
    min-height:46px;
    padding:11px 10px!important;
    white-space:normal;
    text-align:center;
    line-height:1.25;
  }

  .portal-main{
    width:calc(100% - 24px)!important;
    margin:18px auto 48px!important;
  }
  .profile-page .page-head{margin-bottom:14px}
  .profile-layout,.account-security-grid{gap:12px!important}
  .profile-layout .panel,.account-security-grid .panel{overflow:visible!important;border-radius:14px}
  .profile-avatar-stage{padding:22px 14px}
  .profile-edit-form,.account-security-grid .stack-form{padding:14px!important}
  .profile-page .form-grid-2{grid-template-columns:1fr!important;gap:10px!important}
  .profile-page .stack-form input,
  .profile-page .stack-form select,
  .profile-page .stack-form textarea{
    width:100%!important;
    min-width:0!important;
    font-size:16px; /* prevents unwanted iOS zoom and keeps controls readable */
  }
  .profile-page .stack-form input[type="file"]{font-size:13px}
  .profile-page .stack-form>.btn,
  .password-change-form>.btn,
  .username-confirm-btn{
    width:100%!important;
    min-height:48px!important;
  }
  .account-current{
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    padding:13px 14px;
  }
  .account-current strong{text-align:left;width:100%}
  .form-section-title{align-items:flex-start;flex-direction:column;gap:4px}
  .profile-lock-notice,.profile-required-notice,.payment-ready-state{margin:12px 14px}
}

@media(max-width:420px){
  .portal-head-actions{grid-template-columns:1fr}
  .portal-main{width:calc(100% - 18px)!important}
  .profile-avatar-large{width:108px!important;height:108px!important}
  .profile-avatar-stage h2{font-size:21px}
}

/* =============================================================
   V19.3 — MOBILE SECONDARY BUTTON TEXT VISIBILITY FIX
   Fixes iOS/mobile browsers where tappable secondary buttons could
   render with an invisible label while the hit area remained active.
   ============================================================= */
.btn-secondary{
  color:var(--ink);
  -webkit-text-fill-color:var(--ink);
  -webkit-appearance:none;
  appearance:none;
  opacity:1;
  visibility:visible;
}

@media(max-width:700px){
  /* Customer portal header: Hồ sơ cá nhân / Đăng xuất */
  .portal-head-actions button.btn-secondary,
  .portal-head-actions a.btn-secondary,
  .portal-logout-btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:var(--ink)!important;
    -webkit-text-fill-color:var(--ink)!important;
    background:#fff!important;
    border:1px solid var(--line)!important;
    opacity:1!important;
    visibility:visible!important;
    font-size:13px!important;
    font-weight:700!important;
    line-height:1.25!important;
    min-height:48px!important;
    text-indent:0!important;
    overflow:visible!important;
  }

  /* Customer system report submit button */
  .member-system-report .date-range-form button.btn-secondary{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    align-items:center!important;
    justify-content:center!important;
    color:var(--ink)!important;
    -webkit-text-fill-color:var(--ink)!important;
    background:#fff!important;
    border:1px solid var(--line)!important;
    opacity:1!important;
    visibility:visible!important;
    font-size:13px!important;
    font-weight:700!important;
    line-height:1.25!important;
    text-indent:0!important;
    overflow:visible!important;
  }

  .member-system-report .date-range-form{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    width:100%!important;
  }
}
