:root {
  --g: #7a8f6f;
  --gl: #cddfcf;
  --gd: #2d3a33;
  --br: #5a3b24;
  --bg: #f6f8f4;
  --tx: #1d1d1b;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Variabel Warna UI */
  --line: #e4ece5;
  --muted: #7d867e;
  --ink: #1d1d1b;
  --green: #516b55;
  --green-dark: #3b513e;
  --soft: #edf3ed;
  --brown: #5a3b24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Outfit, system-ui, sans-serif;
  background: #e4ebe2;
  color: var(--tx);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  transition: opacity 0.25s, transform 0.25s;
}
body.leave { opacity: 0; transform: translateY(-8px); }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #fff;
  padding: 14px 16px 110px;
  position: relative;
  overflow-x: hidden;
}
.app.auth,
.app.splash {
  padding: 0;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes drift {
  to {
    transform: translate3d(-402px, -260px, 0);
  }
}
@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(20px);
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}
.rise {
  opacity: 0;
  animation: rise 0.6s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.drift {
  position: absolute;
  inset: 0;
  width: calc(100% + 402px);
  height: calc(100% + 260px);
  background: var(--g) url(../img/pattern.png);
  animation: drift 30s linear infinite;
}
.splash {
  background: var(--g);
  display: grid;
  place-items: center;
}
.splash .logo-pop {
  width: 48px;
  height: min(260px, 45dvh);
  object-fit: contain;
  position: relative;
  animation: pop 1s var(--ease) 0.2s both;
  mix-blend-mode: normal;
}
/* auth */
.hero {
  height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 38px 30px;
  color: #fff;
}
.hero.short {
  height: 190px;
}
body:is([data-page="login"], [data-page="register"]) .auth-logo {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: clamp(28px, 8vw, 56px);
  width: 42px;
  height: 132px;
  object-fit: contain;
}
.hello {
  position: relative;
}
.hello h2 {
  font-size: 44px;
  font-weight: 600;
}
.hello p {
  font-size: 20px;
}
.sheet {
  background: #fff;
  border-radius: 40px 40px 0 0;
  margin-top: -30px;
  padding: 32px 46px;
  position: relative;
  min-height: 60vh;
}
.title {
  font-size: 36px;
  color: var(--g);
  font-weight: 700;
  margin: 6px 0 24px;
}
.back {
  font-size: 13px;
}
.field {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--g);
  border-radius: 999px;
  padding: 12px 18px;
  margin-bottom: 22px;
  box-shadow: 5px 5px 0 var(--g);
  color: var(--br);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.field:focus-within {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--g);
}
.field input {
  border: 0;
  outline: 0;
  flex: 1;
  font: inherit;
  font-size: 15px;
  min-width: 0;
  background: none;
}
.field svg {
  width: 26px;
  height: 26px;
}
.eye {
  opacity: 0.6;
}
.btn-main {
  width: 100%;
  background: var(--g);
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  padding: 12px;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s,
    filter 0.2s;
}
.btn-main:active {
  transform: scale(0.97);
}
.btn-main:disabled {
  filter: grayscale(0.4);
  opacity: 0.7;
}
.err {
  color: #b3261e;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 6px;
  text-align: center;
}
.err.on {
  animation: shake 0.4s;
}
.alt {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}
.alt a {
  color: var(--g);
  font-weight: 700;
  margin-left: 4px;
}
.reset-sheet {
  padding-right: 32px;
  padding-left: 32px;
}
.reset-sheet .title {
  font-size: clamp(30px, 8vw, 36px);
}
.reset-sheet [hidden] {
  display: none !important;
}
.reset-note,
.reset-notice,
.reset-error {
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.reset-note {
  margin: 0 0 18px;
  color: #777;
}
.reset-notice {
  display: none;
  margin-top: 12px;
  color: var(--g);
}
.reset-notice.on {
  display: block;
}
.reset-notice.error,
.reset-error {
  color: #b3261e;
}
.reset-error {
  min-height: 18px;
  margin: 8px 0;
}
.reset-error.on {
  animation: shake 0.4s;
}
.reset-link-button {
  display: block;
  text-align: center;
}
.reset-secondary-button {
  margin-top: 10px;
  background: #edf1eb;
  color: #43563e;
}
.reset-secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}
.reset-change-email {
  display: block;
  margin: 14px auto 0;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--g);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
/* top & nav */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.top small {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.top h1 {
  font-size: 26px;
  color: var(--g);
  line-height: 1;
}
.btn-ic,
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gl);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.avatar {
  background: var(--br);
  color: #fff;
  font-weight: 700;
}
.bell:hover svg {
  animation: shake 0.5s;
}
.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 34px 34px 0 0;
  border: 2px solid var(--gl);
  border-bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 12px 10px 16px;
  z-index: 5;
}
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 20px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
  color: var(--br);
}
.nav a.on {
  font-weight: 700;
}
.pill {
  position: absolute;
  top: 12px;
  height: 36px;
  width: 70px;
  background: var(--gl);
  border-radius: 999px;
  transition: left 0.45s var(--ease);
}
.nav a.on svg {
  transform: translateY(-1px);
}
.nav a .ui-icon { font-size:22px; }
.nav a.on .ui-icon { transform:translateY(-1px); }
.top .btn-ic .ui-icon { font-size:20px; }
.owner-signout .ui-icon { font-size:18px; }
.search .ui-icon { font-size:20px; }
.date-pill-btn .ui-icon,
.modal-close-btn .ui-icon { font-size:16px; color:var(--green-dark); }
/* cards */
.greet {
  font-size: 23px;
  margin-top: 6px;
}
.sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
}
.card {
  border: 2px solid var(--gl);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 4px 4px 0 var(--gl);
  background: #fff;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-2px);
}
.card h3 {
  font-size: 17px;
}
.card.center {
  text-align: center;
}
.hero-card {
  background: linear-gradient(135deg, #2d3a33, #3f5246);
  color: #fff;
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px #2d3a3355;
}
.hero-card small {
  font-size: 10px;
  letter-spacing: 0.8px;
  opacity: 0.8;
}
.big {
  font-size: 26px;
  margin: 10px 0 4px;
}
.big b {
  font-size: 34px;
  font-weight: 700;
}
.ok {
  font-size: 12px;
  opacity: 0.9;
  padding-bottom: 12px;
  border-bottom: 1px solid #fff3;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.stats b {
  display: block;
  font-size: 15px;
  margin-top: 2px;
}
.chip-d {
  background: #fff2;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
}
.seg {
  display: flex;
  background: var(--gl);
  border-radius: 99px;
  padding: 4px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
}
.seg button {
  padding: 6px 12px;
  border-radius: 99px;
  color: var(--br);
  transition: 0.3s;
}
.seg button.on {
  background: #fff;
  box-shadow: 0 1px 4px #0002;
}
.seg.wide {
  margin-bottom: 12px;
}
.seg.wide button {
  flex: 1;
  padding: 10px 4px;
  font-size: 13px;
}
.bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  margin-top: 14px;
  gap: 6px;
}
.bar {
  flex: 1;
  text-align: center;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 2px;
  border-radius: 10px;
  transition: color .2s, background .2s, transform .2s;
}
.bar:hover,
.bar:focus-visible { color: var(--br); background: #f7faf6; transform: translateY(-2px); outline: none; }
.bar:focus-visible { box-shadow: 0 0 0 2px var(--gl); }
.bar i {
  display: block;
  width: 100%;
  max-width: 26px;
  border-radius: 99px;
  background: var(--gl);
  height: 0;
  transition: height 0.9s var(--ease);
  transition-delay: calc(var(--n) * 60ms);
}
.bar.hi i {
  background: var(--g);
}
.bar.hi {
  font-weight: 700;
}
.num {
  font-size: 24px;
  font-weight: 600;
  margin: 6px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8f0e9;
}
.meta {
  font-size: 12px;
}
.meta b {
  color: var(--g);
}
.ic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gl);
  display: grid;
  place-items: center;
  color: var(--g);
}
.krow {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
}
.sec {
  margin: 6px 0 10px;
}
.prod {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 2px solid var(--gl);
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--gl);
  position: relative;
}
.prod img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gl);
}
.prod .rk {
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--gd);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.prod div {
  flex: 1;
  font-size: 12px;
}
.prod b {
  font-size: 15px;
  display: block;
  margin-bottom: 2px;
}
.prod .om {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.prod .om strong {
  color: var(--g);
  font-size: 15px;
}
/* orders */
.gauge {
  width: 230px;
  height: auto;
  margin-top: 8px;
  stroke-width: 16;
  stroke-linecap: round;
}
.g-bg {
  stroke: var(--gl);
}
.g-fg {
  stroke: var(--g);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.4s var(--ease) 0.2s;
}
.gnum {
  font-size: 34px;
  font-weight: 700;
  margin-top: -62px;
}
.card.center small {
  display: block;
  margin-top: 22px;
  font-size: 12px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--gl);
  border-radius: 99px;
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--gl);
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 14px;
}
.ord {
  display: block;
  border: 2px solid var(--gl);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--gl);
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}
.ord .h {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
}
.tag {
  background: var(--gl);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 500;
}
.ord .b {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.ord .b > div {
  flex: 1;
  font-size: 12px;
}
.ord .b b {
  font-size: 15px;
  display: block;
}
.ord .b strong {
  color: var(--br);
}
.ord .go {
  display: block;
  text-align: center;
  background: var(--g);
  color: #fff;
  border-radius: 99px;
  padding: 9px;
  font-weight: 600;
  transition: 0.2s;
}
.ord .go:hover {
  filter: brightness(1.1);
}
.empty {
  text-align: center;
  color: #888;
  padding: 30px;
}
/* detail */
.dbox {
  border: 2px solid var(--gl);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--gl);
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 90ms);
}
.dbox small {
  font-size: 11px;
}
.dbox hr {
  border: 0;
  border-top: 1px solid #dde6de;
  margin: 10px 0;
}
.proof {
  background: var(--gl);
  border: 2px dashed var(--g);
  border-radius: 20px;
  min-height: 120px;
  max-height: 400px;
  display: grid;
  place-items: center;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  overflow: auto;
}
.proof img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
}
.mi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
}
.mi i {
  width: 34px;
  height: 34px;
  border: 2px solid var(--g);
  border-radius: 10px;
  flex: none;
  position: relative;
  transition: 0.25s;
}
.mi i.ck {
  background: var(--g);
}
.mi i.ck::after {
  content: "✓";
  color: #fff;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.mi span {
  flex: 1;
}
.mi b {
  display: block;
}
.mi small {
  color: #666;
}
.jd {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 8px;
}
.cta {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 14px 16px 20px;
  background: #fff;
  border-radius: 30px 30px 0 0;
  border: 2px solid var(--gl);
  border-bottom: 0;
}
.skel {
  height: 90px;
  border-radius: 20px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #eef3ee 25%, #dfe9e0 50%, #eef3ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
/* produk */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 4px;
}
.chips button {
  background: var(--gl);
  color: var(--br);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  white-space: nowrap;
  transition: 0.25s;
}
.chips button.on {
  background: var(--g);
  color: #fff;
}
.chips .crit {
  background: var(--br);
  color: #fff;
}
.pr {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #e4ece5;
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms);
}
.pr:last-child {
  border: 0;
}

.pr img {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--gl);
  flex: none;
}
.pr div {
  flex: 1;
  min-width: 0;
}
.pr b {
  font-size: 15px;
}
.pr small {
  display: block;
  font-size: 12px;
  margin: 1px 0 6px;
}
.meter {
  height: 5px;
  border-radius: 9px;
  background: var(--gl);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--g);
  border-radius: 9px;
  transition: width 1s var(--ease);
}
.meter.low i {
  background: var(--br);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 30px);
  background: var(--gd);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s var(--ease);
  z-index: 20;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--gl);
  color: var(--br);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-logout svg {
  width: 17px;
  height: 17px;
}
.btn-logout:hover {
  background: var(--g);
  color: #fff;
}
.app.auth, .app.splash { padding: 0; }

svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { to { transform: translate3d(-402px, -260px, 0); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.6) translateY(20px); } 70% { transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.rise { opacity: 0; animation: rise 0.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
.drift { position: absolute; inset: 0; width: calc(100% + 402px); height: calc(100% + 260px); background: var(--g) url(../img/Pattern_se.noesa.png); animation: drift 30s linear infinite; }
.splash { background: var(--g); display: grid; place-items: center; }
.splash .logo-pop { width: 48px; height: min(260px, 45dvh); object-fit: contain; position: relative; animation: splash-logo-enter 1.2s var(--ease) 0.2s both; mix-blend-mode: normal; }
@keyframes splash-logo-enter {
  from { opacity: 0; transform: translateY(28px) scale(.35); }
  75% { opacity: 1; transform: translateY(-6px) scale(1.08); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero { height: 260px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 0 38px 30px; color: #fff; }
.hero.short { height: 190px; }
.hello { position: relative; }
.hello h2 { font-size: 44px; font-weight: 600; }
.hello p { font-size: 20px; }
.sheet { background: #fff; border-radius: 40px 40px 0 0; margin-top: -30px; padding: 32px 46px; position: relative; min-height: 60vh; }
.title { font-size: 36px; color: var(--g); font-weight: 700; margin: 6px 0 24px; }
.back { font-size: 13px; }
.field { display: flex; align-items: center; gap: 14px; border: 2px solid var(--g); border-radius: 999px; padding: 12px 18px; margin-bottom: 22px; box-shadow: 5px 5px 0 var(--g); color: var(--br); transition: transform 0.2s, box-shadow 0.2s; }
.field:focus-within { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--g); }
.field input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 15px; min-width: 0; background: none; }
.field svg { width: 26px; height: 26px; }
.eye { opacity: 0.6; }
.btn-main { width: 100%; background: var(--g); color: #fff; font-weight: 600; font-size: 20px; padding: 12px; border-radius: 999px; position: relative; overflow: hidden; transition: transform 0.15s, filter 0.2s; }
.btn-main:active { transform: scale(0.97); }
.btn-main:disabled { filter: grayscale(0.4); opacity: 0.7; }
.err { color: #b3261e; font-size: 13px; min-height: 18px; margin-bottom: 6px; text-align: center; }
.err.on { animation: shake 0.4s; }
.alt { text-align: center; font-size: 13px; margin-top: 10px; }
.alt a { color: var(--g); font-weight: 700; margin-left: 4px; }

.reset-sheet { padding-right: 32px; padding-left: 32px; }
.reset-sheet .title { font-size: clamp(30px, 8vw, 36px); }
.reset-sheet [hidden] { display: none !important; }
.reset-note, .reset-notice, .reset-error { font-size: 13px; line-height: 1.5; text-align: center; }
.reset-note { margin: 0 0 18px; color: #777; }
.reset-notice { display: none; margin-top: 12px; color: var(--g); }
.reset-notice.on { display: block; }
.reset-notice.error, .reset-error { color: #b3261e; }
.reset-error { min-height: 18px; margin: 8px 0; }
.reset-error.on { animation: shake 0.4s; }
.reset-link-button { display: block; text-align: center; }
.reset-secondary-button { margin-top: 10px; background: #edf1eb; color: #43563e; }
.reset-secondary-button:disabled { cursor: wait; opacity: 0.7; }
.reset-change-email { display: block; margin: 14px auto 0; padding: 6px 12px; border: 0; background: transparent; color: var(--g); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.top small { font-size: 11px; font-weight: 500; display: block; }
.top h1 { font-size: 26px; color: var(--g); line-height: 1; }
.btn-ic, .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--gl); display: grid; place-items: center; font-size: 24px; }
.avatar { background: var(--br); color: #fff; font-weight: 700; }
.bell:hover svg { animation: shake 0.5s; }

.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: #fff; border-radius: 34px 34px 0 0; border: 2px solid var(--gl); border-bottom: 0; display: flex; justify-content: space-around; padding: 12px 10px 16px; z-index: 5; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; padding: 6px 20px; border-radius: 999px; position: relative; z-index: 1; color: var(--br); }
.nav a.on { font-weight: 700; }
.pill { position: absolute; top: 12px; height: 36px; width: 70px; background: var(--gl); border-radius: 999px; transition: left 0.45s var(--ease); }
.nav a.on svg { transform: translateY(-1px); }

.greet { font-size: 23px; margin-top: 6px; }
.sub { font-size: 12px; color: #888; margin-bottom: 14px; }
.card { border: 2px solid var(--gl); border-radius: 22px; padding: 16px; margin-bottom: 14px; box-shadow: 4px 4px 0 var(--gl); background: #fff; transition: transform 0.2s; }
.card:hover { transform: translateY(-2px); }
.card h3 { font-size: 17px; }
.card.center { text-align: center; }

.hero-card { background: linear-gradient(135deg, #2d3a33, #3f5246); color: #fff; border-radius: 24px; padding: 20px; margin-bottom: 14px; box-shadow: 0 10px 24px #2d3a3355; }
.hero-card small { font-size: 10px; letter-spacing: 0.8px; opacity: 0.8; }
.big { font-size: 26px; margin: 10px 0 4px; }
.big b { font-size: 34px; font-weight: 700; }
.ok { font-size: 12px; opacity: 0.9; padding-bottom: 12px; border-bottom: 1px solid #fff3; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats b { display: block; font-size: 15px; margin-top: 2px; }
.chip-d { background: #fff2; border-radius: 99px; padding: 4px 10px; font-size: 12px; }

.seg { display: flex; background: var(--gl); border-radius: 99px; padding: 4px; font-size: 12px; font-weight: 600; position: relative; }
.seg button { padding: 6px 12px; border-radius: 99px; color: var(--br); transition: 0.3s; }
.seg button.on { background: #fff; box-shadow: 0 1px 4px #0002; }
.seg.wide { margin-bottom: 12px; }
.seg.wide button { flex: 1; padding: 10px 4px; font-size: 13px; }

.bars { display: flex; align-items: flex-end; justify-content: space-between; height: 150px; margin-top: 14px; gap: 6px; }
.bar { flex: 1; text-align: center; font-size: 11px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; padding: 0 2px; border-radius: 10px; transition: color .2s, background .2s, transform .2s; }
.bar:hover, .bar:focus-visible { color: var(--br); background: #f7faf6; transform: translateY(-2px); outline: none; }
.bar:focus-visible { box-shadow: 0 0 0 2px var(--gl); }
.bar i { display: block; width: 100%; max-width: 26px; border-radius: 99px; background: var(--gl); height: 0; transition: height 0.9s var(--ease); transition-delay: calc(var(--n) * 60ms); }
.bar.hi i { background: var(--g); }
.bar.hi { font-weight: 700; }

.num { font-size: 24px; font-weight: 600; margin: 6px 0; padding-bottom: 8px; border-bottom: 1px solid #e8f0e9; }
.meta { font-size: 12px; }
.meta b { color: var(--g); }
.ic { width: 32px; height: 32px; border-radius: 50%; background: var(--gl); display: grid; place-items: center; color: var(--g); }
.krow { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; }
.sec { margin: 6px 0 10px; }

.prod { display: flex; gap: 12px; align-items: center; border: 2px solid var(--gl); border-radius: 18px; padding: 10px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--gl); position: relative; }
.prod img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--gl); }
.prod .rk { position: absolute; top: 2px; left: 2px; background: var(--gd); color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; display: grid; place-items: center; }
.prod div { flex: 1; font-size: 12px; }
.prod b { font-size: 15px; display: block; margin-bottom: 2px; }
.prod .om { display: flex; justify-content: space-between; margin-top: 6px; }
.prod .om strong { color: var(--g); font-size: 15px; }

.gauge { width: 230px; height: auto; margin-top: 8px; stroke-width: 16; stroke-linecap: round; }
.g-bg { stroke: var(--gl); }
.g-fg { stroke: var(--g); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease) 0.2s; }
.gnum { font-size: 34px; font-weight: 700; margin-top: -62px; }
.card.center small { display: block; margin-top: 22px; font-size: 12px; }

.search { display: flex; align-items: center; gap: 10px; border: 2px solid var(--gl); border-radius: 99px; padding: 10px 16px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--gl); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; }

.ord { display: block; border: 2px solid var(--gl); border-radius: 20px; padding: 14px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--gl); animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.ord .h { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.tag { background: var(--gl); font-size: 11px; padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.ord .b { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.ord .b > div { flex: 1; font-size: 12px; }
.ord .b b { font-size: 15px; display: block; }
.ord .b strong { color: var(--br); }
.ord .go { display: block; text-align: center; background: var(--g); color: #fff; border-radius: 99px; padding: 9px; font-weight: 600; transition: 0.2s; }
.ord .go:hover { filter: brightness(1.1); }
.empty { text-align: center; color: #888; padding: 30px; }

.dbox { border: 2px solid var(--gl); border-radius: 20px; padding: 14px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--gl); animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.dbox small { font-size: 11px; }
.dbox hr { border: 0; border-top: 1px solid #dde6de; margin: 10px 0; }
.proof { background: var(--gl); border: 2px dashed var(--g); border-radius: 20px; height: 220px; display: grid; place-items: center; text-align: center; margin-top: 10px; font-size: 12px; overflow: hidden; }
.proof img { width: 100%; height: 100%; object-fit: cover; }
.mi { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; }
.mi i { width: 34px; height: 34px; border: 2px solid var(--g); border-radius: 10px; flex: none; position: relative; transition: 0.25s; }
.mi i.ck { background: var(--g); }
.mi i.ck::after { content: "✓"; color: #fff; position: absolute; inset: 0; display: grid; place-items: center; }
.mi span { flex: 1; }
.mi b { display: block; }
.mi small { color: #666; }
.jd { display: flex; justify-content: space-between; font-size: 12px; margin-top: 8px; }
.cta { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; padding: 14px 16px 20px; background: #fff; border-radius: 30px 30px 0 0; border: 2px solid var(--gl); border-bottom: 0; }
.skel { height: 90px; border-radius: 20px; margin-bottom: 12px; background: linear-gradient(90deg, #eef3ee 25%, #dfe9e0 50%, #eef3ee 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.chips button { background: var(--gl); color: var(--br); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 99px; white-space: nowrap; transition: 0.25s; }
.chips button.on { background: var(--g); color: #fff; }
.chips .crit { background: var(--br); color: #fff; }
.pr { display: flex; gap: 14px; align-items: center; min-width: 0; padding: 12px 0; border-bottom: 1px solid #e4ece5; animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.pr:last-child { border: 0; }
.pr img { width: 50px; height: 50px; border-radius: 14px; object-fit: cover; background: var(--gl); flex: none; }
.pr div { flex: 1; min-width: 0; }
.pr b { font-size: 15px; }
.pr small { display: block; font-size: 12px; margin: 1px 0 6px; }
.meter { height: 5px; border-radius: 9px; background: var(--gl); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--g); border-radius: 9px; transition: width 1s var(--ease); }
.meter.low i { background: var(--br); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 30px); background: var(--gd); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 13px; opacity: 0; pointer-events: none; transition: 0.35s var(--ease); z-index: 20; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

.btn-logout { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-radius: 999px; background: var(--gl); color: var(--br); font-size: 12px; font-weight: 700; white-space: nowrap; }
.btn-logout svg { width: 17px; height: 17px; }
.btn-logout:hover { background: var(--g); color: #fff; }

@media (max-width: 480px) {
  body { justify-content: stretch; }
  .app:not(.auth):not(.splash) { width: 100%; max-width: none; min-height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 14px calc(96px + env(safe-area-inset-bottom)); }
  .top { gap: 8px; padding: 5px 0 12px; }
  .top h1 { font-size: clamp(21px, 6vw, 26px); }
  .top small { font-size: 10px; }
  .btn-logout { min-height: 40px; padding: 8px 10px; }
  .nav { left: 0; bottom: 0; transform: none; max-width: none; border-radius: 20px 20px 0 0; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -5px 22px #23332612; }
  .nav a { min-width: 0; flex: 1; padding: 8px 5px; font-size: 10px; }
  .pill { top: 8px; }
  .hero-card, .card { border-radius: 19px; }
  .hero-card { padding: 17px; }
  .stats { gap: 6px; }
  .stats small { font-size: 8px; }
  .stats b { font-size: 13px; }
  .seg { max-width: 68%; }
  .seg button { padding: 6px 8px; font-size: 10px; }
  .seg.wide { max-width: none; }
  .seg.wide button { font-size: 11px; }
  .gauge { width: min(230px, 75vw); }
  .cta { bottom: env(safe-area-inset-bottom); padding-bottom: 14px; }
}

@media (min-width: 481px) and (max-width: 899px) {
  body[data-page="dashboard"] .app,
  body[data-page="orders"] .app,
  body[data-page="products"] .app,
  body[data-page="notifications"] .app,
  body[data-page="detail"] .app { max-width: 840px; }
  body[data-page="dashboard"] .nav,
  body[data-page="orders"] .nav,
  body[data-page="products"] .nav,
  body[data-page="notifications"] .nav { max-width: 840px; }
}

@media (min-width: 900px) {
  body[data-page="dashboard"],
  body[data-page="orders"],
  body[data-page="products"],
  body[data-page="notifications"],
  body[data-page="detail"] {
    justify-content: flex-start;
    background: #f2f5f0;
  }
  body[data-page="dashboard"] .app,
  body[data-page="orders"] .app,
  body[data-page="products"] .app,
  body[data-page="notifications"] .app,
  body[data-page="detail"] .app {
    width: calc(100% - 224px);
    max-width: none;
    min-height: 100dvh;
    margin-left: 224px;
    padding: 30px clamp(28px, 4vw, 64px) 90px;
    overflow: visible;
    background: #f7f9f6;
    box-shadow: 0 0 40px #28382b0b;
  }
  body[data-page="dashboard"] .nav,
  body[data-page="orders"] .nav,
  body[data-page="products"] .nav,
  body[data-page="notifications"] .nav,
  body[data-page="detail"] .nav {
    inset: 0 auto 0 0;
    transform: none;
    width: 224px;
    max-width: none;
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 9px;
    padding: 38px 12px;
    border: 0;
    border-right: 1px solid #e4ece5;
    border-radius: 0 22px 22px 0;
    box-shadow: 5px 0 28px #28382b0b;
  }
  body[data-page="dashboard"] .nav a,
  body[data-page="orders"] .nav a,
  body[data-page="products"] .nav a,
  body[data-page="notifications"] .nav a,
  body[data-page="detail"] .nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    min-height: 52px;
    padding: 10px 16px;
    font-size: 14px;
  }
  body[data-page="dashboard"] .pill,
  body[data-page="orders"] .pill,
  body[data-page="products"] .pill,
  body[data-page="notifications"] .pill,
  body[data-page="detail"] .pill {
    top: 38px;
    left: 12px;
    height: 52px;
    border-radius: 14px;
  }
  .top { margin-bottom: 0; padding-bottom: 22px; border-bottom: 1px solid #e4ece5; }
  .top h1 { font-size: 30px; }
  .greet { font-size: 30px; }
  .sub { font-size: 14px; }
  .hero-card, .card { padding: 22px; border-radius: 22px; }
  body[data-page="dashboard"] .app { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-content: start; gap: 18px; }
  body[data-page="dashboard"] .top,
  body[data-page="dashboard"] .app > section:nth-of-type(1),
  body[data-page="dashboard"] .sec { grid-column: 1 / -1; }
  body[data-page="dashboard"] .hero-card { grid-column: span 5; margin: 0; }
  body[data-page="dashboard"] .hero-card + .card { grid-column: span 7; margin: 0; }
  body[data-page="dashboard"] .hero-card + .card + .card,
  body[data-page="dashboard"] .hero-card + .card + .card + .card { grid-column: span 6; margin: 0; }
  body[data-page="dashboard"] #top { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body[data-page="orders"] .app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); align-content: start; gap: 18px; }
  body[data-page="orders"] .top,
  body[data-page="orders"] #tabs,
  body[data-page="orders"] #list { grid-column: 1 / -1; }
  body[data-page="orders"] .card.center,
  body[data-page="orders"] .search { align-self: center; margin: 0; }
  body[data-page="orders"] #list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  body[data-page="products"] .app { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-content: start; gap: 16px; }
  body[data-page="products"] .top,
  body[data-page="products"] .search,
  body[data-page="products"] .chips,
  body[data-page="products"] #quota-summary,
  body[data-page="products"] #plist { grid-column: 1 / -1; margin: 0; }
  body[data-page="products"] #plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
  body[data-page="detail"] .app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; gap: 18px; }
  body[data-page="detail"] .top,
  body[data-page="detail"] #detail { grid-column: 1 / -1; }
  body[data-page="detail"] #detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  body[data-page="detail"] .dbox { margin: 0; }
  body[data-page="detail"] .cta { left: calc(224px + (100vw - 224px) / 2); bottom: 16px; width: min(720px, calc(100% - 280px)); padding: 14px 18px; border: 1px solid #e4ece5; border-radius: 18px; box-shadow: 0 8px 30px #10241422; }
  .gauge { width: min(230px, 100%); }
}

@media (min-width: 760px) {
  body[data-page="login"], body[data-page="register"] { align-items: center; padding: 24px; background: radial-gradient(circle at 14% 15%, #d6e2d4 0, transparent 34%), #eef2eb; }
  .app.auth { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); width: min(1040px, 100%); max-width: none; height: min(760px, calc(100vh - 48px)); min-height: min(620px, calc(100vh - 32px)); padding: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 80px #263a2b24; }
  .app.auth .hero { height: 100%; min-height: 0; align-items: flex-end; padding: clamp(32px, 5vw, 68px); overflow: hidden; }
  .app.auth .hero.short { height: 100%; min-height: 0; }
  body:is([data-page="login"], [data-page="register"]) .app.auth .auth-logo { top: 50%; left: 50%; right: auto; width: auto; height: min(300px, 34vh); transform: translate(-50%, -50%); }
  .app.auth .hello h2 { font-size: clamp(44px, 5vw, 62px); }
  .app.auth .hello p { font-size: 19px; }
  .app.auth .hero.short::after { content: "Bergabung dengan se.noesa"; position: relative; z-index: 1; max-width: 360px; color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 600; line-height: 1.12; }
  .app.auth .sheet { display: flex; flex-direction: column; justify-content: center; min-height: 0; margin: 0; padding: clamp(32px, 5vw, 68px); border-radius: 0; overflow-y: auto; }
  .app.auth .sheet form { width: 100%; max-width: 440px; margin-inline: auto; }
  .app.auth .title { font-size: 34px; margin: 12px auto 26px; }
  .app.auth .sheet > .back { width: 100%; max-width: 440px; margin: 0 auto; }
  .app.auth .alt { margin: 16px auto 0; }
  .app.auth .field { margin-bottom: 18px; }
}

/* =========================================
   OWNER PAYMENTS
   ========================================= */
.payment-admin-intro { margin: 12px 0 20px; }
.payment-admin-intro h2 { color: var(--gd); font-size: 22px; margin: 5px 0; }
.payment-admin-intro p:last-child { color: #7d867e; font-size: 14px; max-width: 650px; }
.payment-admin-grid { display: grid; gap: 18px; align-items: start; }
.payment-method-form label:not(.payment-active) { display: grid; gap: 7px; margin: 16px 0; color: var(--br); font-size: 13px; font-weight: 600; }
.payment-method-form input:not([type=checkbox]) { width: 100%; min-height: 46px; border: 1px solid var(--gl); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
.payment-method-form input[type=file] { padding: 9px; font-size: 12px; }
.payment-method-form input[type=file]::file-selector-button { min-height: 38px; margin-right: 10px; padding: 7px 14px; border: 1px solid var(--gl); border-radius: 999px; background: #fff; color: var(--gd); font: inherit; font-weight: 600; cursor: pointer; }
.payment-method-form label small { color: #7d867e; font-weight: 400; }
.payment-active { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gd); }
.payment-preview { display: grid; place-items: center; min-height: 180px; max-height: 320px; margin: 16px 0; padding: 14px; overflow: hidden; border: 1px dashed var(--g); border-radius: 16px; background: #f2f6f1; color: #7d867e; font-size: 13px; }
.payment-preview img { max-width: 100%; max-height: 280px; object-fit: contain; }
.payment-form-actions { display: flex; gap: 10px; align-items: center; }
.payment-form-actions .btn-main { font-size: 15px; }
.payment-cancel, .payment-item-actions button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--gl); border-radius: 999px; color: var(--gd); font-size: 12px; font-weight: 600; }
.payment-cancel[hidden] { display: none; }
.payment-form-error { min-height: 18px; margin: 6px 0; color: #b3261e; font-size: 13px; }
.payment-method-list { display: grid; gap: 12px; }
.payment-method-item { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 14px; align-items: center; }
.payment-method-image { display: grid; place-items: center; height: 94px; overflow: hidden; border-radius: 12px; background: #f2f6f1; }
.payment-method-image img { width: 100%; height: 100%; object-fit: contain; }
.payment-method-copy h3 { margin: 6px 0 2px; color: var(--br); }
.payment-method-copy small { color: #7d867e; }
.payment-state { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.payment-state.active { background: #e8f2e8; color: #52755c; }
.payment-state.inactive { background: #f2eee6; color: #8d6b38; }
.payment-item-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.payment-item-actions button { min-height: 36px; padding: 7px 11px; }
.payment-item-actions .danger { border-color: #efc8c2; color: #a53d30; }
body[data-page="payments"] { justify-content: flex-start; background: #f2f5f0; }
body[data-page="payments"] .app { width: 100%; max-width: 430px; }
body[data-page="payments"] .nav { max-width: 430px; }
@media (min-width: 900px) {
  body[data-page="payments"] .app { width: calc(100% - 224px); max-width: none; min-height: 100dvh; margin-left: 224px; padding: 30px clamp(28px,4vw,64px) 90px; overflow: visible; background: #f7f9f6; box-shadow: 0 0 40px #28382b0b; }
  body[data-page="payments"] .nav { inset: 0 auto 0 0; transform: none; width: 224px; max-width: none; height: 100dvh; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 9px; padding: 38px 12px; border: 0; border-right: 1px solid #e4ece5; border-radius: 0 22px 22px 0; box-shadow: 5px 0 28px #28382b0b; }
  body[data-page="payments"] .nav a { flex-direction: row; justify-content: flex-start; gap: 13px; min-height: 52px; padding: 10px 16px; font-size: 14px; }
  body[data-page="payments"] .pill { top: 38px; left: 12px; height: 52px; border-radius: 14px; }
  .payment-admin-grid { grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr); }
}
.payment-admin-intro .eyebrow { color: var(--g); font-size: 11px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }

/* =========================================
   CONFIRM DIALOG (CENTERED)
   ========================================= */
.confirm-dialog {
  width: min(400px, calc(100% - 28px));
  border: 1px solid var(--gl);
  border-radius: 24px;
  padding: 30px 24px 24px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(21, 32, 24, 0.4);
  text-align: center;
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 90vh;
  z-index: 9999;
}
.confirm-dialog::backdrop { background: rgba(21, 32, 24, 0.5); backdrop-filter: blur(4px); }
.confirm-content { display: flex; flex-direction: column; align-items: center; }
.confirm-icon { width: 65px; height: 65px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; margin-bottom: 10px; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

/* =========================================
   DASHBOARD — TOMBOL RENTANG & CHART
   ========================================= */
.dashboard-header {
  flex-wrap: wrap;
}

.date-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.date-pill-btn:hover { border-color: var(--green); box-shadow: 0 4px 12px rgba(81,107,85,0.08); }
.date-pill-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--green-dark); stroke-width: 2; flex-shrink: 0; }

/* Grafik Batang Default (Kotak Rounded) */
.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 220px;
  padding-top: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.chart-container::-webkit-scrollbar { height: 4px; }
.chart-container::-webkit-scrollbar-thumb { background: var(--gl); border-radius: 10px; }

.chart-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  min-width: 36px; /* Mencegah batang terlalu kurus saat discroll */
  height: 100%;
  position: relative;
}
.bar-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.chart-bar {
  width: 80%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--green) 0%, #6a856e 100%);
  border-radius: 8px 8px 4px 4px; /* Ujung atas tumpul, bawah agak kotak */
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 10px #516b5520;
}
.chart-bar:hover {
  background: var(--green-dark);
  transform: scaleX(1.05);
}
.chart-bar.zero {
  background: #e5eae5;
  box-shadow: none;
  border-radius: 99px; /* Ujung melengkung jadi pil untuk nilai 0 */
}
.chart-bar.zero:hover {
  background: #d1d8d2;
}

.chart-tooltip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: var(--ink);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.chart-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}
.chart-bar:hover .chart-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chart-label {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .row.between.dashboard-header { flex-direction: column; align-items: flex-start !important; gap: 12px; }
  .date-filter-pills { width: 100%; justify-content: space-between; }
  .date-pill-btn { flex: 1; justify-content: center; }
}

/* =========================================
   DIALOG KALENDER CUSTOM
   ========================================= */
.custom-date-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 92vh;
  width: min(360px, calc(100% - 28px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 24px 90px rgba(16,36,20,0.28);
  background: transparent;
  overflow: visible;
}
.custom-date-dialog::backdrop { background: rgba(21,32,24,0.55); backdrop-filter: blur(5px); }

.date-modal-content {
  padding: 24px;
  background: #fff;
  border-radius: 20px;
  max-height: 92vh;
  overflow-y: auto;
}

/* Header Dialog */
.date-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.date-modal-header .eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.date-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--br);
  margin: 0;
  line-height: 1.3;
}
.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: #fff;
  cursor: pointer;
  transition: 0.2s;
  flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--soft); border-color: var(--gl); }
.modal-close-btn svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; }

/* Footer Dialog */
.date-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 10px;
}
.today-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.today-indicator i {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: block;
}
.btn-today {
  background: var(--soft);
  color: var(--green-dark);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-today:hover { background: #e2e8e1; }

/* =========================================
   FLATPICKR INLINE OVERRIDE
   ========================================= */
#calendar-mount { width: 100%; }

#calendar-mount .flatpickr-calendar.inline {
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  font-family: inherit !important;
}
#calendar-mount .flatpickr-calendar * { font-family: inherit !important; }

/* Header Bulan ( < November 2026 > ) */
#calendar-mount .flatpickr-months {
  width: 100%;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

#calendar-mount .flatpickr-current-month {
  position: static !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* Owner order workflow */
.owner-orders-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
}
.owner-orders-intro h2 {
  color: var(--gd);
  font-size: 20px;
}
.owner-orders-intro p,
.owner-muted {
  color: #777;
  font-size: 12px;
  line-height: 1.5;
}
.offline-trigger {
  width: auto;
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
}
.owner-capacity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.owner-capacity h3 {
  margin-bottom: 4px;
}
.owner-capacity p {
  color: #777;
  font-size: 12px;
}
.capacity-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gl);
  color: var(--gd);
  font-size: 22px;
}
.order-tabs {
  max-width: 100%;
  overflow-x: auto;
  justify-content: flex-start;
  gap: 5px;
  margin: 14px 0 12px;
  padding: 5px;
  border-radius: 16px;
  scrollbar-width: thin;
}
.order-tabs button {
  flex: none;
  white-space: nowrap;
  padding: 9px 12px;
  font-size: 12px;
}
.order-tabs button b {
  margin-left: 3px;
}
.owner-order {
  color: var(--tx);
}
.owner-order .h {
  align-items: center;
  gap: 8px;
}
.owner-order .h > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.owner-order .b {
  align-items: flex-start;
}
.owner-order .b > div small {
  display: block;
  margin-top: 4px;
  color: #777;
}
.owner-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8eee7;
  color: #425741;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
}
.owner-status.menunggu_pembayaran { background: #fff1d2; color: #805a11; }
.owner-status.menunggu_validasi { background: #fff1d2; color: #805a11; }
.owner-status.diproses { background: #e6efff; color: #365991; }
.owner-status.selesai { background: #e3f2e7; color: #316844; }
.owner-status.ditolak,
.owner-status.dibatalkan { background: #f9e6e3; color: #9a4037; }
.owner-source {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f0ede7;
  color: #66573e;
  font-size: 10px;
  font-style: normal;
}
.owner-order-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #e8eee7;
  color: #777;
  font-size: 10px;
}
.owner-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.top .btn-ic svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}
.owner-back-link {
  color: var(--br);
  font-size: 13px;
  font-weight: 600;
}
.owner-order-code {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}
.owner-total {
  padding-top: 9px;
  border-top: 1px solid #dde6de;
  font-size: 14px;
}
.owner-total b {
  color: var(--gd);
}
.owner-proof-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-top: 10px;
  border: 2px dashed var(--g);
  border-radius: 18px;
  background: #f3f6f1;
  color: #777;
  font-size: 13px;
}
.proof {
  display: block;
}
body[data-page="detail"] .proof {
  max-height: min(70vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
}
body[data-page="detail"] .proof img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
.owner-rejection {
  border-color: #efcfca;
  background: #fff8f7;
}
.owner-rejection p {
  margin-top: 6px;
  color: #76413a;
  font-size: 13px;
}
.owner-menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e8eee7;
  font-size: 13px;
}
.owner-menu-row > span {
  flex: 1;
}
.owner-menu-row b,
.owner-menu-row small {
  display: block;
}
.owner-menu-row small {
  margin-top: 3px;
  color: #777;
  font-size: 11px;
}
.owner-menu-row input[type="checkbox"] {
  width: 21px;
  height: 21px;
  accent-color: var(--g);
}
.owner-menu-row strong {
  font-size: 12px;
}
.owner-dispatch-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.owner-dispatch-photos img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
}
.owner-upload {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.owner-upload label,
.owner-upload small {
  font-size: 12px;
}
.owner-upload small {
  color: #777;
}
.owner-detail-actions {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px;
  margin: 12px 0 4px;
  border: 1px solid #e4ece5;
  border-radius: 18px;
  background: #ffffffed;
  box-shadow: 0 8px 26px #10241418;
}
.owner-detail-actions[hidden] {
  display: none;
}
.owner-detail-actions button,
.owner-dialog-actions button {
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.owner-danger {
  background: #fff;
  border: 1px solid #bd5a50;
  color: #a5463b;
  font-weight: 600;
}
.owner-detail-actions button[hidden] {
  display: none;
}
.owner-error {
  min-height: 18px;
  color: #a5463b;
  font-size: 12px;
}
.owner-dialog {
  width: min(460px, calc(100% - 28px));
  max-height: min(90vh, 760px);
  margin: auto;
  padding: 22px;
  overflow-y: auto;
  border: 1px solid var(--gl);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 90px #15201855;
}
.owner-dialog::backdrop {
  background: #15201888;
  backdrop-filter: blur(3px);
}
.owner-dialog form {
  display: grid;
  gap: 12px;
}
.owner-dialog-heading,
.owner-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.owner-dialog-heading small {
  color: var(--g);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.owner-dialog-heading h2 {
  color: var(--gd);
  font-size: 20px;
}
.owner-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #edf2eb;
  font-size: 23px;
}
.owner-dialog label {
  display: grid;
  gap: 5px;
  color: var(--gd);
  font-size: 12px;
  font-weight: 600;
}
.owner-dialog input:not([type="number"]):not([type="checkbox"]),
.owner-dialog textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cedbca;
  border-radius: 10px;
  color: var(--tx);
  font: inherit;
  font-size: 13px;
}
.owner-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.owner-menu-section {
  padding: 12px;
  border-radius: 14px;
  background: #f5f8f3;
}
.owner-menu-list {
  max-height: 210px;
  overflow-y: auto;
  margin-top: 8px;
}
.owner-menu-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e9df;
}
.owner-menu-item span {
  flex: 1;
}
.owner-menu-item small {
  display: block;
  margin-top: 3px;
  color: #777;
  font-size: 10px;
  font-weight: 400;
}
.owner-menu-item input[type="number"] {
  width: 68px;
}
.owner-order-total {
  padding-top: 10px;
  border-top: 1px solid #e2e9df;
}
.owner-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.owner-secondary {
  padding: 9px 13px;
  border: 1px solid #cedbca;
  border-radius: 999px;
  background: #f2f6ef;
  color: var(--gd);
  font-weight: 600;
}

@media (min-width: 900px) {
  body[data-page="orders"] .app {
    display: block;
  }
  body[data-page="orders"] .top {
    margin-bottom: 0;
  }
  body[data-page="orders"] .owner-orders-intro,
  body[data-page="orders"] .owner-capacity,
  body[data-page="orders"] .order-tabs,
  body[data-page="orders"] .search {
    margin-right: 0;
    margin-left: 0;
  }
  body[data-page="orders"] #order-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  body[data-page="orders"] #order-list .ord {
    margin: 0;
  }
  body[data-page="detail"] .app {
    display: block;
  }
  body[data-page="detail"] #order-detail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }
  body[data-page="detail"] #order-detail .detail-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  body[data-page="detail"] #order-detail .detail-col:only-child,
  body[data-page="detail"] #order-detail > .owner-error {
    grid-column: 1 / -1;
  }
  body[data-page="detail"] #order-detail .dbox {
    margin: 0;
  }
}
@media (max-width: 480px) {
  .owner-orders-intro {
    align-items: flex-start;
  }
  .owner-orders-intro h2 {
    font-size: 17px;
  }
  .offline-trigger {
    padding: 8px 10px;
    font-size: 10px;
  }
  .owner-detail-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    justify-content: center;
    max-width: 430px;
    margin: 0 auto;
    padding: 12px 10px calc(14px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
  }
  .owner-detail-actions button {
    flex: 1;
    padding: 10px 7px;
    font-size: 11px;
  }
}

/* 1. Wadah grafik menjadi acuan tooltip & menyembunyikan scrollbar */
.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 220px;
  padding-top: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
  -ms-overflow-style: none; /* Sembunyikan scrollbar di IE/Edge */
}

/* Sembunyikan scrollbar di Chrome/Safari/Opera */
.chart-container::-webkit-scrollbar {
  display: none; 
}

.chart-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  min-width: 36px;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

/* 2. Diagram Batang (Default Abu-abu, Bentuk Kapsul) */
.chart-bar {
  width: 80%;
  max-width: 32px;
  background: #e5eae5; /* Warna default sebelum di-hover */
  border-radius: 99px; /* Membuat ujung sepenuhnya membulat */
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
  position: relative;
}

/* 3. Warna saat di-hover / di-klik (Hijau) - Berlaku untuk SEMUA bar, termasuk yang 0 */
.chart-col:hover .chart-bar,
.chart-col.active .chart-bar {
  background: linear-gradient(180deg, var(--green) 0%, #6a856e 100%);
  box-shadow: 0 4px 10px #516b5520;
  transform: scaleX(1.05);
}

/* 4. Tooltip Melayang (Tanggal & Pemasukan) */
.chart-tip {
  position: absolute;
  z-index: 20;
  background: var(--gd, #2d3a33);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none; /* Agar kursor tembus dan tidak mengganggu hover */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.chart-tip.show {
  opacity: 1;
  transform: translateY(0);
}

.chart-tip small {
  color: #b8cbb9; /* Warna teks tanggal lebih redup */
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Panah penunjuk di bawah tooltip */
.chart-tip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: calc(var(--arrow-x, 50%) - 5px); 
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: var(--gd, #2d3a33) transparent transparent transparent;
}

/* Label Tanggal di bawah batang */
.chart-label {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
  white-space: nowrap;
}

/* =========================================
   GRAFIK TREN PESANAN (TAMPILAN KAPSUL BERSIH)
   ========================================= */
.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 185px;
  padding: 24px 4px 8px;
  border-bottom: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gl) transparent;
}

.chart-container::-webkit-scrollbar {
  height: 4px;
}

.chart-container::-webkit-scrollbar-thumb {
  background: var(--gl);
  border-radius: 999px;
}

.chart-container.is-loading {
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.chart-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  flex: 1 0 32px;
  min-width: 32px;
  height: 100%;
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.chart-col:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.chart-bar {
  width: 100%;
  max-width: 24px;
  background: var(--gl);
  border-radius: 999px;
  box-shadow: none;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), height 0.5s var(--ease), opacity 0.2s var(--ease);
}

.chart-bar.zero {
  background: var(--gl);
  box-shadow: none;
  border-radius: 999px;
}

.chart-col:hover .chart-bar,
.chart-col.active .chart-bar {
  background: var(--g);
  box-shadow: 0 4px 12px rgba(122, 143, 111, 0.28);
  transform: translateY(-2px);
}

.chart-container.has-selection .chart-col:not(.selected):not(:hover):not(.active) .chart-bar {
  opacity: 0.58;
}

.chart-col.selected .chart-bar {
  background: var(--green-dark, #3b513e);
  box-shadow: 0 4px 14px rgba(59, 81, 62, 0.35);
  transform: translateY(-2px);
  min-height: 6px;
}

.chart-col.selected .chart-label {
  color: var(--green-dark, #3b513e);
  font-weight: 700;
}

.chart-tip {
  position: absolute;
  z-index: 20;
  background: var(--gd, #2d3a33);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.chart-tip.show {
  opacity: 1;
  transform: translateY(0);
}

.chart-tip small {
  color: #b8cbb9;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.chart-tip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: calc(var(--arrow-x, 50%) - 5px);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: var(--gd, #2d3a33) transparent transparent transparent;
}

.chart-label {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--br);
  margin-top: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-col.is-last .chart-label {
  font-weight: 700;
}

/* =========================================
   PENYELARASAN HEADER & SIDEBAR OWNER = ADMIN
   ========================================= */
.owner-brand,
.owner-sidebar-bottom,
.owner-mobile-logout,
.owner-header-notifications,
.owner-menu-toggle {
  display: none;
}

.today-label {
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 900px) {
  body[data-page="dashboard"] .nav,
  body[data-page="orders"] .nav,
  body[data-page="products"] .nav,
  body[data-page="notifications"] .nav,
  body[data-page="detail"] .nav,
  body[data-page="payments"] .nav {
    width: 252px;
    padding: 25px 18px;
    border-radius: 0;
    border-right: 1px solid #d3e2d4;
    box-shadow: none;
  }

  .owner-brand {
    display: flex !important;
    gap: 12px;
    align-items: center;
    color: var(--br);
    font-size: 18px;
    font-weight: 700;
    padding: 4px 9px 26px;
    min-height: auto !important;
  }

  .owner-brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #758d76;
    margin-top: 3px;
  }

  .owner-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: #758d76;
    color: #fff;
    display: grid;
    place-items: center;
    font: 25px Georgia, serif;
    flex: none;
  }
  .owner-brand-mark img {
    display: block;
    width: 16px;
    height: 34px;
    object-fit: contain;
  }

  body[data-page="dashboard"] .nav a:not(.owner-brand),
  body[data-page="orders"] .nav a:not(.owner-brand),
  body[data-page="products"] .nav a:not(.owner-brand),
  body[data-page="notifications"] .nav a:not(.owner-brand),
  body[data-page="detail"] .nav a:not(.owner-brand),
  body[data-page="payments"] .nav a:not(.owner-brand) {
    height: 46px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    gap: 12px;
    font-size: 14px;
    color: #5f645f;
  }

  body[data-page="dashboard"] .nav a:not(.owner-brand).on,
  body[data-page="orders"] .nav a:not(.owner-brand).on,
  body[data-page="products"] .nav a:not(.owner-brand).on,
  body[data-page="notifications"] .nav a:not(.owner-brand).on,
  body[data-page="detail"] .nav a:not(.owner-brand).on,
  body[data-page="payments"] .nav a:not(.owner-brand).on {
    background: #e5eee5;
    color: #506b55;
    font-weight: 600;
  }

  body[data-page="dashboard"] .pill,
  body[data-page="orders"] .pill,
  body[data-page="products"] .pill,
  body[data-page="notifications"] .pill,
  body[data-page="detail"] .pill,
  body[data-page="payments"] .pill {
    display: none;
  }

  .owner-sidebar-bottom {
    display: block;
    margin-top: auto;
    border-top: 1px solid #edf1ec;
    padding-top: 17px;
  }

  .owner-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 7px 5px 13px;
  }

  .owner-profile .avatar {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .owner-profile b,
  .owner-profile small {
    display: block;
  }

  .owner-profile b {
    font-size: 13px;
    color: var(--tx);
  }

  .owner-profile small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
  }

  .owner-signout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    background: none;
    border: 0;
    color: var(--br);
    padding: 10px 8px;
    font-size: 13px;
    border-radius: 10px;
  }

  .owner-signout svg {
    width: 18px;
    height: 18px;
  }

  .owner-signout:hover {
    background: #f7efeb;
  }

  body[data-page="dashboard"] .app,
  body[data-page="orders"] .app,
  body[data-page="products"] .app,
  body[data-page="notifications"] .app,
  body[data-page="detail"] .app,
  body[data-page="payments"] .app {
    width: calc(100% - 252px);
    margin-left: 252px;
    padding-top: 119px;
    background: #f5f7f4;
  }

  body[data-page="dashboard"] .top,
  body[data-page="orders"] .top,
  body[data-page="products"] .top,
  body[data-page="notifications"] .top,
  body[data-page="detail"] .top,
  body[data-page="payments"] .top {
    position: fixed;
    top: 0;
    left: 252px;
    right: 0;
    height: 91px;
    margin: 0;
    padding: 0 clamp(24px, 4vw, 56px);
    background: #fff;
    border-bottom: 1px solid #d3e2d4;
    z-index: 10;
  }

  .top small {
    font-size: 11px;
    color: var(--muted);
  }

  .top h1 {
    font-size: 23px;
    margin: 3px 0 0;
    color: #506b55;
  }

  body[data-page="detail"] .cta {
    left: calc(252px + (100vw - 252px) / 2);
  }
}

@media (max-width: 899px) {
  body[data-role="owner"] .app:not(.auth):not(.splash) { width: 100%; max-width: none; min-height: 100vh; min-height: 100dvh; padding: 14px 16px 32px; overflow: visible; }
  body[data-role="owner"] { overflow-x: hidden; }
  body[data-role="owner"] .top { position: relative; gap: 13px; padding: 14px 17px; }
  body[data-role="owner"] .top > .row:first-child { min-width: 0; gap: 13px; }
  body[data-role="owner"] .top > .row:first-child > div { min-width: 0; }
  body[data-role="owner"] .owner-menu-toggle { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #d3e2d4; border-radius: 12px; background: #fff; color: #506b55; font-size: 20px; box-shadow: 0 3px 10px rgba(40, 62, 43, 0.06); }
  body[data-role="owner"] .owner-menu-toggle:focus-visible { outline: 3px solid rgba(80, 107, 85, 0.3); outline-offset: 2px; }
  body[data-role="owner"] .owner-top-copy { min-width: 0; }
  body[data-role="owner"] .owner-top-copy small { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; }
  body[data-role="owner"] .top h1 { overflow: hidden; margin: 3px 0 0; font-size: clamp(16px, 4.6vw, 19px); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  body[data-role="owner"] .owner-header-notifications { display: none; }
  body[data-role="owner"] .top > .row:last-child { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
  body[data-role="owner"] .top .today-label { display: none; }
  body[data-role="owner"] .owner-brand { display: flex !important; flex: 0 0 auto; gap: 12px; align-items: center; min-height: 54px; margin-bottom: 24px; padding: 4px 9px 14px; border-bottom: 1px solid #edf1ec; color: var(--br); font-size: 18px; font-weight: 700; }
  body[data-role="owner"] .owner-brand small { display: block; margin-top: 3px; color: #758d76; font-size: 9px; letter-spacing: 1.5px; }
  body[data-role="owner"] .owner-brand-mark { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 13px; background: #758d76; }
  body[data-role="owner"] .owner-brand-mark img { display: block; width: 16px; height: 34px; object-fit: contain; }
  body[data-role="owner"] .nav { position: fixed; inset: 0 auto 0 0; z-index: 42; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; width: min(300px, 84vw); max-width: none; height: 100vh; height: 100dvh; padding: 22px 16px max(44px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; border: 0; border-right: 1px solid #d3e2d4; border-radius: 0; background: #fff; box-shadow: 0 10px 28px rgba(40, 62, 43, 0.12); transform: translateX(-105%); transition: transform 0.25s var(--ease), visibility 0.25s; visibility: hidden; }
  body[data-role="owner"] .nav.open { transform: translateX(0); visibility: visible; }
  body[data-role="owner"] .nav .pill { display: none !important; }
  body[data-role="owner"] .nav a:not(.owner-brand) { display: flex; flex: 0 0 46px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-width: 0; min-height: 46px; height: 46px; padding: 0 12px; border-radius: 12px; color: #5f645f; font-size: 14px; line-height: 1.2; text-align: left; }
  body[data-role="owner"] .nav a:not(.owner-brand) .ui-icon { flex: 0 0 22px; font-size: 20px; }
  body[data-role="owner"] .nav a:not(.owner-brand).on { background: #e5eee5; color: #506b55; font-weight: 600; }
  body[data-role="owner"] .owner-sidebar-bottom { position: sticky; bottom: 0; display: flex !important; flex: 0 0 auto; align-items: center; gap: 10px; margin-top: auto; border-top: 1px solid #edf1ec; padding: 14px 0 8px; background: #fff; }
  body[data-role="owner"] .owner-profile { display: flex; flex: 1 1 auto; min-width: 0; gap: 10px; align-items: center; padding: 7px 5px; }
  body[data-role="owner"] .owner-profile > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  body[data-role="owner"] .owner-profile b, body[data-role="owner"] .owner-profile small { display: block; }
  body[data-role="owner"] .owner-profile b { font-size: 13px; }
  body[data-role="owner"] .owner-profile small { margin-top: 2px; color: var(--muted); font-size: 11px; }
  body[data-role="owner"] .owner-signout { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 42px; padding: 0 11px; border: 1px solid #ead9d3; border-radius: 11px; background: #fbf5f2; color: var(--br); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
  body[data-role="owner"] .owner-mobile-logout { display: none !important; }
  body[data-role="owner"] .owner-sidebar-backdrop { position: fixed; inset: 0; z-index: 41; display: block; border: 0; padding: 0; background: rgba(22, 31, 24, 0.42); opacity: 0; visibility: hidden; transition: opacity 0.22s ease, visibility 0.22s ease; -webkit-tap-highlight-color: transparent; }
  body[data-role="owner"] .owner-sidebar-backdrop.open { opacity: 1; visibility: visible; }
  body[data-role="owner"].owner-menu-open { overflow: hidden; }
  .today-label { display: none; }
  .top { background: #fff; border-bottom: 1px solid #d3e2d4; padding: 14px 0; margin: -14px -16px 14px; }
  .top small { color: var(--muted); }
  .top h1 { font-size: 19px; color: #506b55; }
}

@media (max-width: 759px) {
  body[data-page="login"],
  body[data-page="register"] {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background: #fff;
    overflow-x: clip;
  }

  body[data-page="login"] .app.auth,
  body[data-page="register"] .app.auth {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    overflow-x: clip;
    overflow-y: visible;
  }

  body[data-page="login"] .app.auth .hero,
  body[data-page="register"] .app.auth .hero {
    flex: none;
    padding: max(20px, env(safe-area-inset-top)) max(clamp(20px, 6vw, 38px), env(safe-area-inset-right)) 24px max(clamp(20px, 6vw, 38px), env(safe-area-inset-left));
  }

  body[data-page="login"] .app.auth .auth-logo,
  body[data-page="register"] .app.auth .auth-logo {
    top: auto;
    bottom: 24px;
    right: max(clamp(36px, 12vw, 110px), env(safe-area-inset-right));
    width: auto;
    height: 168px;
  }

  body[data-page="register"] .app.auth .auth-logo {
    bottom: 12px;
  }

  body[data-page="login"] .app.auth .sheet,
  body[data-page="register"] .app.auth .sheet {
    flex: 1 0 auto;
    min-height: 0;
    margin-top: 0;
    border-radius: 0;
    background: #fff;
    padding: 24px max(clamp(20px, 6vw, 44px), env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(clamp(20px, 6vw, 44px), env(safe-area-inset-left));
  }

  body[data-page="login"] .app.auth .sheet > .back,
  body[data-page="register"] .app.auth .sheet > .back,
  body[data-page="login"] .app.auth .sheet > .title,
  body[data-page="register"] .app.auth .sheet > .title,
  body[data-page="login"] .app.auth .sheet form,
  body[data-page="register"] .app.auth .sheet form,
  body[data-page="login"] .app.auth .sheet > .alt,
  body[data-page="register"] .app.auth .sheet > .alt {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
  }

  body[data-page="login"] .app.auth .title,
  body[data-page="register"] .app.auth .title {
    margin-top: 6px;
    margin-bottom: 20px;
  }
}

@media (max-width: 359px) {
  body[data-page="login"] .app.auth .hello h2 {
    font-size: 38px;
  }

  body[data-page="login"] .app.auth .hello p {
    font-size: 17px;
  }

  body[data-page="login"] .app.auth .title,
  body[data-page="register"] .app.auth .title {
    font-size: 30px;
    margin-bottom: 16px;
  }

  body[data-page="login"] .app.auth .field,
  body[data-page="register"] .app.auth .field {
    gap: 10px;
    padding: 11px 14px;
    margin-bottom: 16px;
  }
}

@media (max-width: 759px) and (max-height: 560px) {
  body[data-page="login"] .app.auth .hero {
    height: 176px;
    padding-bottom: 18px;
  }

  body[data-page="register"] .app.auth .hero.short {
    height: 120px;
  }

  body[data-page="login"] .app.auth .auth-logo {
    top: auto;
    bottom: 18px;
    width: auto;
    height: 112px;
  }

  body[data-page="register"] .app.auth .auth-logo {
    top: auto;
    bottom: 14px;
    width: auto;
    height: 92px;
  }

  body[data-page="login"] .app.auth .hello h2 {
    font-size: 32px;
  }

  body[data-page="login"] .app.auth .hello p {
    font-size: 16px;
  }

  body[data-page="login"] .app.auth .sheet,
  body[data-page="register"] .app.auth .sheet {
    padding-top: 18px;
  }

  body[data-page="login"] .app.auth .title,
  body[data-page="register"] .app.auth .title {
    font-size: 28px;
    margin-bottom: 14px;
  }

  body[data-page="login"] .app.auth .field,
  body[data-page="register"] .app.auth .field {
    margin-bottom: 14px;
  }
}

@media (min-width: 760px) and (max-height: 540px) {
  body[data-page="login"],
  body[data-page="register"] {
    padding: 16px;
  }

  .app.auth {
    height: calc(100vh - 32px);
    min-height: 0;
  }

  .app.auth .hero {
    padding: 18px 28px;
  }

  body:is([data-page="login"], [data-page="register"]) .app.auth .auth-logo {
    height: max(134px, 34vh);
  }

  .app.auth .hello h2 {
    font-size: 28px;
    line-height: 1.1;
  }

  .app.auth .hello p {
    font-size: 14px;
  }

  .app.auth .hero.short::after {
    font-size: 24px;
  }

  .app.auth .sheet {
    justify-content: flex-start;
    padding: 20px 28px;
  }
}

/* =========================================
   SPLASH SCREEN (index.php) - MOBILE & DESKTOP
   ========================================= */
body[data-page="splash"] {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* Mengunci scroll vertikal & horizontal */
  background: var(--g);
}

body[data-page="splash"] .app.splash {
  width: 100%;
  max-width: none; /* Menghilangkan batas 430px agar penuh di laptop & mobile */
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  position: relative;
  overflow: hidden; /* Memotong kelebihan animasi .drift */
  display: grid;
  place-items: center;
}

/* Tampilan Mobile (< 760px) */
@media (max-width: 759px) {
  body[data-page="splash"] .logo-pop {
    width: 44px;
    height: min(220px, 40dvh);
  }
}

/* Tampilan Laptop / Desktop (>= 760px) */
@media (min-width: 760px) {
  body[data-page="splash"] .logo-pop {
    width: 68px;
    height: min(320px, 48dvh);
  }
}