:root {
  --bg1: #f9c7da;
  --bg2: #f6b9d4;
  --card: #ffeaf3;
  --card2: #fff3f8;
  --ink: #7b1237;
  --muted: #a93a63;
  --accent: #ec4b93;
  --accent2: #ff75b2;
  --border: rgba(236, 75, 147, 0.25);
  --shadow: 0 18px 60px rgba(123, 18, 55, 0.16);
  --radius: 22px;
  --radius2: 16px;
  --ring: rgba(236, 75, 147, 0.25);
  --patternOpacity: 0.18;
  --containerMax: 1020px;
  /* overlay untuk background image */
  --overlay1: 249, 199, 218; /* RGB untuk pink 1 */
  --overlay2: 246, 185, 212; /* RGB untuk pink 2 */
  --overlayOpacity: 0.55; /* 0 - 1 */
  --bgImage: url("../images/bg.jpg");
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;

  /* overlay bisa diatur opacity-nya */
  background: linear-gradient(
      135deg,
      rgba(var(--overlay1), var(--overlayOpacity)),
      rgba(var(--overlay2), var(--overlayOpacity))
    ),
    var(--bgImage);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* opsional */
}

/* pattern overlay */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 14px 14px,
      rgba(255, 255, 255, 0.55) 2px,
      transparent 2.5px
    ),
    radial-gradient(
      circle at 0 0,
      rgba(255, 255, 255, 0.25) 1px,
      transparent 2px
    ),
    radial-gradient(
      900px 550px at 35% 85%,
      rgba(255, 255, 255, 0.25),
      transparent 70%
    );
  background-size: 42px 42px, 26px 26px, auto;
  opacity: var(--patternOpacity);
  pointer-events: none;
}

.decor {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 220px;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  filter: drop-shadow(0 18px 40px rgba(123, 18, 55, 0.18));
}
.decor.left {
  left: -35px;
}
.decor.right {
  right: -35px;
  transform: scaleX(-1);
}
.cup {
  width: 120px;
  height: 260px;
  border-radius: 26px 26px 40px 40px;
  background: linear-gradient(180deg, #ffd6e7 0%, #ffeaf3 30%, #ffd1e4 100%);
  border: 2px solid rgba(236, 75, 147, 0.22);
  position: relative;
}
.cup::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 18px;
  right: 18px;
  height: 34px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffeef6, #ffd3e6);
  border: 2px solid rgba(236, 75, 147, 0.18);
}
.cup::after {
  content: "";
  position: absolute;
  bottom: 28px;
  left: 14px;
  right: 14px;
  height: 72px;
  border-radius: 18px;
  background: radial-gradient(
      circle at 22% 36%,
      rgba(236, 75, 147, 0.22) 0 18px,
      transparent 18px
    ),
    radial-gradient(
      circle at 78% 60%,
      rgba(236, 75, 147, 0.18) 0 14px,
      transparent 14px
    ),
    linear-gradient(180deg, rgba(236, 75, 147, 0.1), rgba(236, 75, 147, 0.04));
}
.flower {
  position: absolute;
  right: -18px;
  top: 28%;
  width: 46px;
  height: 46px;
  background: radial-gradient(circle, #fff 0 10px, transparent 11px),
    conic-gradient(
      from 0deg,
      #fff 0 15%,
      transparent 15% 20%,
      #fff 20% 35%,
      transparent 35% 40%,
      #fff 40% 55%,
      transparent 55% 60%,
      #fff 60% 75%,
      transparent 75% 80%,
      #fff 80% 95%,
      transparent 95% 100%
    );
  border-radius: 50%;
  filter: drop-shadow(0 10px 20px rgba(123, 18, 55, 0.16));
}
.flower::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: #ffd058;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(236, 75, 147, 0.12);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--containerMax), 92vw);
  margin: 38px auto 26px;
}

.panel {
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  backdrop-filter: blur(6px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 10px 6px;
  border-bottom: 1px solid rgba(236, 75, 147, 0.18);
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.18s ease;
  user-select: none;
}
.tab:hover {
  background: rgba(236, 75, 147, 0.1);
}
.tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 22px rgba(236, 75, 147, 0.22);
}

.content {
  padding: 18px 8px 6px;
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .decor {
    display: none;
  }
}

.title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 4px 0 14px;
}
.subtitle {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 6px 0 14px;
  text-align: center;
}

.card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(236, 75, 147, 0.16);
  border-radius: var(--radius2);
  padding: 14px;
}

.row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
label {
  font-weight: 800;
  color: var(--ink);
}
.hint {
  font-size: 12px;
  color: rgba(123, 18, 55, 0.75);
  line-height: 1.35;
}

input,
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(236, 75, 147, 0.2);
  background: rgba(255, 255, 255, 0.55);
  outline: none;
  font-size: 14px;
  color: var(--ink);
}
input::placeholder {
  color: rgba(123, 18, 55, 0.45);
}
input:focus,
select:focus {
  border-color: rgba(236, 75, 147, 0.5);
  box-shadow: 0 0 0 4px rgba(236, 75, 147, 0.12);
}

.sliderLine {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.sliderLine input[type="range"] {
  flex: 1;
}
.pill {
  min-width: 64px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(236, 75, 147, 0.1);
  border: 1px solid rgba(236, 75, 147, 0.2);
  font-weight: 900;
  color: var(--ink);
}

.btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--accent);
  color: white;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(236, 75, 147, 0.2);
  transition: 0.16s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0px);
  opacity: 0.92;
}

.resultWrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.resultTitle {
  font-weight: 1000;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 6px;
}
.resultValue {
  font-size: 40px;
  font-weight: 1000;
  color: var(--ink);
  line-height: 1.05;
  margin: 2px 0 4px;
}
.smallValue {
  font-size: 13px;
  color: rgba(123, 18, 55, 0.75);
  font-weight: 700;
}

.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--ring) 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(236, 75, 147, 0.16);
}
.donut span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(236, 75, 147, 0.12);
  display: grid;
  place-items: center;
  font-weight: 1000;
  color: var(--ink);
}

.divider {
  height: 1px;
  width: 100%;
  background: rgba(236, 75, 147, 0.18);
  margin: 10px 0 12px;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: rgba(123, 18, 55, 0.75);
  padding: 12px 0 22px;
}

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(236, 75, 147, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.settingsBtn {
  border: 1px solid rgba(236, 75, 147, 0.2);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 14, 0.38);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 18px;
}
.modal.show {
  display: flex;
}
.modalCard {
  width: min(640px, 96vw);
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(236, 75, 147, 0.22);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
}
.modalTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.modalTop h3 {
  margin: 0;
  font-weight: 1000;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.closeBtn {
  border: 0;
  background: rgba(236, 75, 147, 0.12);
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 1000;
  cursor: pointer;
}

/* calendar */
.calHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.calTitle {
  font-weight: 1000;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  flex: 1;
}
.iconBtn {
  width: 44px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(236, 75, 147, 0.2);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-weight: 1000;
  color: var(--ink);
}
.calGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.dow {
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  color: rgba(123, 18, 55, 0.75);
  padding: 6px 0;
}
.day {
  padding: 12px 0;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(236, 75, 147, 0.1);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: 0.12s ease;
}
.day:hover {
  background: rgba(236, 75, 147, 0.1);
}
.day.muted {
  opacity: 0.35;
  cursor: default;
}
.day.selected {
  background: var(--accent);
  color: #fff;
  border-color: rgba(236, 75, 147, 0.3);
  box-shadow: 0 10px 18px rgba(236, 75, 147, 0.18);
  font-weight: 1000;
}
