:root{
  --bg:#212121;
  --fg:rgba(255,255,255,.92);
  --mut:rgba(255,255,255,.65);
  --sheet:#171717;
  --card:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.10);
  --blur:8px;

  --blk-width:100%;
  --blk-minh:140px;
  --blk-rot:0deg;
  --blk-bw:1px;
  --blk-radius:22px;
  --blk-gap:10px;
  --blk-shadow:0;

  --l10-radius:0px;
  --l10-gap:0px;
  --l10-shadow:1;

  --blk-margin:10px;
  --blk-img-opacity:.88;
  --blk-img-fit:cover;
}

*{box-sizing:border-box}
html,body{height:100%}

html.sheet-open,
body.sheet-open{
  overflow:hidden;
  touch-action:none;
  overscroll-behavior:none;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--fg);
  background:var(--bg);
  overflow-x:hidden;
  overscroll-behavior-y:none;
}

.bgLayer{
  position:fixed;
  inset:0;
  z-index:-2;
  background-size:cover;
  background-position:center;
  filter:blur(var(--blur));
  transform:scale(1.06);
  opacity:.55;
  display:none;
}

.bgShade{
  position:fixed;
  inset:0;
  z-index:-1;
  background:linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.72));
  display:none;
}

/* ===== Top bar ===== */
header{
  position:sticky;
  top:0;
  z-index:10;
  padding:12px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.brand{
  font-family:"Cinzel", serif;
  font-weight:700;
  letter-spacing:.8px;
  opacity:.96;
  font-size:18px;
  cursor:pointer;
  user-select:none;
  transition:opacity .15s ease, transform .15s ease;
}

.brand:active{
  transform:scale(.98);
}

.brand:hover{
  opacity:1;
}

.icons{
  display:flex;
  gap:10px;
  align-items:center;
}

.icon{
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.icon:active{transform:scale(.98)}
.icon.hidden{display:none}

.icon svg{
  width:22px;
  height:22px;
  stroke:rgba(255,255,255,.82);
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.95;
}

main{
  padding:10px 12px 40px;
  max-width:820px;
  margin:0 auto;
}

/* ===== Sheet ===== */
#backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:90;
  touch-action:none;
}

#backdrop.show{
  opacity:1;
  pointer-events:auto;
}

#sheet{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  background:var(--sheet);
  border-top-left-radius:22px;
  border-top-right-radius:22px;
  border-top:1px solid rgba(255,255,255,.10);
  transform:translateY(110%);
  transition:transform .22s ease;
  z-index:100;
  padding:10px 14px 16px;
  box-shadow:0 -26px 85px rgba(0,0,0,.62);
  max-height:calc(100vh - 14px);
  display:flex;
  flex-direction:column;
  touch-action:none;
  will-change:transform;
  overscroll-behavior:contain;
}

#sheet.show{
  transform:translateY(0);
}

.grab{
  width:44px;
  height:5px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  margin:4px auto 10px;
  flex:0 0 auto;
}

#sheetContent{
  max-width:560px;
  margin:0 auto;
  width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:14px;
  overscroll-behavior:contain;
}

.sheet-title{
  font-weight:900;
  font-size:18px;
  margin:4px 0 10px;
}

.note{
  color:rgba(255,255,255,.60);
  font-size:13px;
  line-height:1.25;
  margin: 20px 0px;
}

.field{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.90);
  outline:none;
  margin-bottom:10px;
}

select.field{appearance:none}

.btn{
  width:100%;
  border:none;
  border-radius:18px;
  padding:12px 14px;
  font-weight:900;
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.92);
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
}

.btn-ghost{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.btn-danger{
  background:rgba(255,90,90,.20);
  border:1px solid rgba(255,90,90,.35);
}

.row2{
  display:flex;
  gap:10px;
}

.row2 .btn{
  width:50%;
}

.menu-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}

.menu-item{
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  font-weight:900;
  cursor:pointer;
}

.hr{
  height:1px;
  background:rgba(255,255,255,.10);
  margin:10px 0;
}

/* user menu */
.userHead{padding:6px 2px 10px}
.userName{
  font-weight:900;
  font-size:20px;
  letter-spacing:.2px;
}
.userRole{
  margin-top:4px;
  color:rgba(255,255,255,.62);
  font-size:13px;
  line-height:1.25;
}
.userHeadLine{
  height:1px;
  background:rgba(255,255,255,.10);
  margin:12px 0 10px;
}

/* file picker */
.hiddenFileInput{display:none}

.fileRow{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  margin-bottom:10px;
}

.fileBtn{
  flex:0 0 auto;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.10);
  color:rgba(255,255,255,.92);
  font-weight:900;
  font-size:14px;
  cursor:pointer;
}

.fileName{
  flex:1;
  min-width:0;
  color:rgba(255,255,255,.70);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.fileClear{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.75);
  display:grid;
  place-items:center;
  cursor:pointer;
}

/* toggle */
.toggle{
  width:46px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  position:relative;
  cursor:pointer;
  outline:none;
}

.toggle.on{
  background:rgba(120,255,160,.22);
}

.toggle span{
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  position:absolute;
  top:2px;
  left:2px;
  transition:left .12s ease;
}

.toggle.on span{
  left:22px;
}

.layoutPick{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.layoutRow{
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}

.mini{
  width:84px;
  height:52px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.mini div{
  width:64px;
  height:12px;
  border-radius:10px;
  background:rgba(255,255,255,.18);
}

.range{
  width:100%;
  margin:8px 0 12px;
}

.pill{
  padding:10px 12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.order-cal-day:active{
  transform:scale(.98);
}
.workers-pick-scroll{
  max-height:220px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
}

.workers-pick-scroll::-webkit-scrollbar{
  width:6px;
}

.workers-pick-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}

.wh-paid-scroll{
  max-height:260px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
  margin-top:6px;
}

.wh-paid-scroll::-webkit-scrollbar{
  width:6px;
}

.wh-paid-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}

.wh-payment-card{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  margin-bottom:12px;
  cursor:pointer;
}

.wh-payment-card:last-child{
  margin-bottom:0;
}

.wh-payment-title{
  font-weight:900;
  font-size:15px;
  line-height:1.2;
  margin-bottom:6px;
}

.wh-payment-note{
  color:rgba(255,255,255,.72);
  font-size:13px;
  line-height:1.25;
}

.wh-unpaid-scroll{
  max-height:260px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
  margin-top:6px;
}

.wh-unpaid-scroll::-webkit-scrollbar{
  width:6px;
}

.wh-unpaid-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}


#sheetContent{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

#sheetContent::-webkit-scrollbar{
  width:6px;
}

#sheetContent::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
}

#sheetContent::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,.20);
}


.icon-badge-wrap{
  position:relative;
}

.icon-badge{
  position:absolute;
  top:-4px;
  right:-2px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:rgba(255,90,90,.95);
  color:#fff;
  font-size:11px;
  font-weight:900;
  line-height:18px;
  text-align:center;
  z-index:2;
  box-shadow:0 4px 12px rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.18);
}
