/* Shared polish for the customer account and legal support surfaces. */
html[data-customer-ui] body.public-legal > .wrap{
  padding:18px 14px calc(96px + env(safe-area-inset-bottom,0px));
}
html[data-customer-ui] body.public-legal :is(.head,.doc,.request){
  border:1px solid var(--b);
  border-radius:20px;
  background:var(--bg2);
  box-shadow:none;
}
html[data-customer-ui] body.public-legal .head{
  min-height:66px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
}
html[data-customer-ui] body.public-legal .head strong{
  min-width:0;
  flex:1;
  overflow:hidden;
  color:var(--tx);
  font-size:16px;
  font-weight:900;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-customer-ui] body.public-legal .head a{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid var(--b);
  border-radius:12px;
  background:var(--bg3);
  color:var(--tx2);
  font-size:11px;
  font-weight:850;
  text-decoration:none;
  white-space:nowrap;
}
html[data-customer-ui] body.public-legal .nav{
  display:flex;
  gap:7px;
  margin:12px 0;
  padding:2px 1px 7px;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
}
html[data-customer-ui] body.public-legal .nav::-webkit-scrollbar{display:none}
html[data-customer-ui] body.public-legal .nav a{
  min-height:40px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  padding:8px 13px;
  border:1px solid var(--b);
  border-radius:12px;
  background:var(--bg2);
  color:var(--tx2);
  font-size:11px;
  font-weight:800;
  text-decoration:none;
  scroll-snap-align:start;
}
html[data-customer-ui] body.public-legal .nav a.on{
  border-color:var(--gb);
  background:var(--gg);
  color:var(--g);
}
html[data-customer-ui] body.public-legal .doc{padding:22px 18px}
html[data-customer-ui] body.public-legal .doc h1{
  margin:0 0 7px;
  color:var(--tx);
  font-size:clamp(24px,7vw,32px);
  font-weight:950;
  letter-spacing:-.02em;
}
html[data-customer-ui] body.public-legal .meta{color:var(--mu);font-size:11px;font-weight:700}
html[data-customer-ui] body.public-legal .body{
  margin-top:20px;
  color:var(--tx2);
  font-size:14px;
  line-height:2;
  white-space:pre-wrap;
}
html[data-customer-ui] body.public-legal .request{margin-top:12px;padding:20px 16px}
html[data-customer-ui] body.public-legal .request h2{
  margin:0 0 5px;
  color:var(--tx);
  font-size:20px;
  font-weight:950;
}
html[data-customer-ui] body.public-legal .request-intro{
  margin:0 0 16px;
  color:var(--mu);
  font-size:11px;
  line-height:1.65;
}
html[data-customer-ui] body.public-legal .grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
html[data-customer-ui] body.public-legal .grid .wide{grid-column:1/-1}
html[data-customer-ui] body.public-legal .field{min-width:0;display:grid;gap:6px}
html[data-customer-ui] body.public-legal .field-label{color:var(--tx2);font-size:11px;font-weight:850}
html[data-customer-ui] body.public-legal :is(input,select,textarea){
  width:100%;
  min-height:48px;
  padding:11px 13px;
  border:1px solid var(--b2);
  border-radius:13px;
  outline:0;
  background:var(--bg3);
  color:var(--tx);
  font:inherit;
  font-size:13px;
}
html[data-customer-ui] body.public-legal textarea{min-height:116px;resize:vertical;line-height:1.65}
html[data-customer-ui] body.public-legal :is(input,select,textarea):focus{
  border-color:var(--g);
  background:var(--bg2);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--g) 13%,transparent);
}
html[data-customer-ui] body.public-legal .request button{
  min-height:50px;
  border:1px solid var(--g);
  border-radius:14px;
  background:var(--g);
  color:var(--app-on-accent,#fff);
  font:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
html[data-customer-ui] body.public-legal .msg{min-height:0;margin-top:10px;color:var(--g);font-size:12px;font-weight:750}

html[data-customer-ui] body.public-auth .fg label{color:var(--tx2)!important;font-size:11px!important;font-weight:850!important}
html[data-customer-ui] body.public-auth .fg :is(input,select,textarea):not(.otp-digit){
  width:100%!important;
  min-height:48px!important;
  padding:11px 13px!important;
  border:1px solid var(--b2)!important;
  border-radius:13px!important;
  outline:0!important;
  background:var(--bg2)!important;
  color:var(--tx)!important;
  box-shadow:none!important;
}
html[data-customer-ui] body.public-auth .fg :is(input,select,textarea):not(.otp-digit):focus{
  border-color:var(--g)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--g) 13%,transparent)!important;
}
html[data-customer-ui] body.public-auth :is(.auth-switch,.steps-bar){border-color:var(--b)!important;background:var(--bg3)!important}
html[data-customer-ui] body.public-auth .auth-switch button{min-height:44px}

html[data-customer-ui] body.public-invoice{
  min-height:100dvh;
  padding:16px 14px 32px!important;
  background:var(--bg)!important;
  color:var(--tx)!important;
  font-family:"Tajawal",system-ui,sans-serif!important;
}
html[data-customer-ui] body.public-invoice .wrap{width:min(100%,520px);margin:auto}
html[data-customer-ui] body.public-invoice .actions{
  position:sticky;
  z-index:5;
  top:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0 0 10px;
  padding:8px 0;
  background:color-mix(in srgb,var(--bg) 94%,transparent);
  backdrop-filter:blur(14px);
}
html[data-customer-ui] body.public-invoice .actions a{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border:1px solid var(--b)!important;
  border-radius:13px!important;
  background:var(--bg2)!important;
  color:var(--tx)!important;
  font-size:12px!important;
  font-weight:850!important;
  text-decoration:none;
}
html[data-customer-ui] body.public-invoice .actions a:last-child{border-color:var(--gb)!important;background:var(--gg)!important;color:var(--g)!important}
html[data-customer-ui] body.public-invoice .bill{
  padding:24px 20px!important;
  border:1px solid var(--b)!important;
  border-radius:22px!important;
  background:var(--bg2)!important;
  color:var(--tx)!important;
  box-shadow:none!important;
}
html[data-customer-ui] body.public-invoice .head h1{color:var(--tx)!important;font-size:22px!important;font-weight:950!important}
html[data-customer-ui] body.public-invoice .head p{color:var(--mu)!important;font-size:12px!important}
html[data-customer-ui] body.public-invoice .readonly{
  margin:17px 0!important;
  padding:11px 12px!important;
  border:1px solid var(--gb)!important;
  border-radius:12px!important;
  background:var(--gg)!important;
  color:var(--g)!important;
}
html[data-customer-ui] body.public-invoice :is(.meta span,.tot span:first-child,.items th,.order-ref,.foot){color:var(--mu)!important}
html[data-customer-ui] body.public-invoice :is(.meta,.tot){min-height:30px;align-items:center;font-size:12px!important}
html[data-customer-ui] body.public-invoice .line{border-color:var(--b)!important}
html[data-customer-ui] body.public-invoice .items{font-size:12px!important}
html[data-customer-ui] body.public-invoice .items th{height:40px;border-color:var(--b)!important;font-weight:850!important}
html[data-customer-ui] body.public-invoice .items td{padding-block:11px!important;border-color:var(--b)!important;color:var(--tx2)!important}
html[data-customer-ui] body.public-invoice .tot.final{border-color:var(--tx)!important;color:var(--tx)!important}
html[data-customer-ui] body.public-invoice .status{
  margin-top:16px!important;
  padding:11px!important;
  border:1px solid var(--b)!important;
  border-radius:12px!important;
}
html[data-customer-ui] body.public-invoice .status.is-paid{border-color:color-mix(in srgb,#15803d 30%,var(--b))!important;background:color-mix(in srgb,#15803d 9%,var(--bg2))!important;color:#15803d!important}
html[data-customer-ui] body.public-invoice .status.is-pending{border-color:color-mix(in srgb,#b45309 30%,var(--b))!important;background:color-mix(in srgb,#b45309 9%,var(--bg2))!important;color:#b45309!important}

html[data-customer-ui] body.public-payment-simulator{
  background:
    radial-gradient(circle at 50% 0,color-mix(in srgb,var(--g) 9%,transparent),transparent 34%),
    var(--bg)!important;
  color:var(--tx)!important;
}
html[data-customer-ui] body.public-payment-simulator .card{
  width:min(460px,100%)!important;
  max-width:460px!important;
  border-color:var(--b)!important;
  border-radius:24px!important;
  background:var(--bg2)!important;
  color:var(--tx)!important;
  box-shadow:none!important;
}
html[data-customer-ui] body.public-payment-simulator .tag{
  border:1px solid var(--gb)!important;
  background:var(--gg)!important;
  color:var(--g)!important;
}
html[data-customer-ui] body.public-payment-simulator .state-icon{
  border:1px solid var(--gb)!important;
  background:var(--gg)!important;
  color:var(--g)!important;
}
html[data-customer-ui] body.public-payment-simulator h1{color:var(--tx)!important;font-weight:950!important;letter-spacing:-.02em}
html[data-customer-ui] body.public-payment-simulator .note{color:var(--mu)!important}
html[data-customer-ui] body.public-payment-simulator .sum{
  border:1px solid var(--b)!important;
  background:var(--bg3)!important;
  color:var(--tx2)!important;
}
html[data-customer-ui] body.public-payment-simulator .actions{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:9px!important;
  margin:20px 0 0!important;
  padding:0!important;
  background:transparent!important;
}
html[data-customer-ui] body.public-payment-simulator .actions a{border:1px solid transparent!important}
html[data-customer-ui] body.public-payment-simulator .actions a{width:100%!important;min-height:48px!important}
html[data-customer-ui] body.public-payment-simulator .actions .success{background:#177846!important;color:#fff!important}
html[data-customer-ui] body.public-payment-simulator .actions .fail{background:#9b2f2f!important;color:#fff!important}
html[data-customer-ui] body.public-payment-simulator .actions .cancel{border-color:var(--b2)!important;background:var(--bg3)!important;color:var(--tx)!important}

@media(max-width:430px){
  html[data-customer-ui] body.public-legal > .wrap{padding-inline:10px}
  html[data-customer-ui] body.public-legal .grid{grid-template-columns:1fr}
  html[data-customer-ui] body.public-legal .grid .wide{grid-column:auto}
  html[data-customer-ui] body.public-legal .head{border-radius:17px}
  html[data-customer-ui] body.public-legal .doc,
  html[data-customer-ui] body.public-legal .request{border-radius:18px}
  html[data-customer-ui] body.public-invoice{padding:0 10px 24px!important;background:var(--bg)!important}
  html[data-customer-ui] body.public-invoice .bill{padding:20px 15px!important;border-radius:19px!important}
  html[data-customer-ui] body.public-payment-simulator{padding:10px!important}
  html[data-customer-ui] body.public-payment-simulator .card{padding:22px 18px!important;border-radius:20px!important}
}
