*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --teal-header: #0a5c5c;
  --teal-dark: #084f4f;
  --bg-page: #e8eef2;
  --card: #ffffff;
  --text: #1f2937;
  --label: #1e3a5f;
  --muted: #64748b;
  --border: #c5d0d8;
  --warn-bg: #ffe8ec;
  --warn-border: #f5a3b0;
  --warn-title: #dc2626;
  --danger: #e11d48;
  --danger-dark: #be123c;
  --nav-active: #ffd54f;
}

html,
body {
  min-height: 100%;
}

body.delete-app {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  padding-bottom: 76px;
}

.delete-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 48px;
  background: var(--teal-header);
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  isolation: isolate;
}

.delete-header h1 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.delete-header__wipe {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(225, 29, 72, 0.22);
  color: #fecdd3;
  cursor: pointer;
}

.delete-header__wipe svg {
  width: 20px;
  height: 20px;
  display: block;
}

.delete-header__wipe:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.delete-header__wipe:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
}

.delete-main {
  width: 100%;
  padding: 10px 8px 20px;
}

.delete-warn {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-bg);
  border: 1.5px solid var(--warn-border);
  text-align: center;
}

.delete-warn__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--warn-title);
}

.delete-warn p {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.delete-card {
  background: var(--card);
  border: 1px solid #d5e0e6;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.delete-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.delete-card__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #ffe4e8;
  color: #9ca3af;
}

.delete-card__icon svg {
  width: 18px;
  height: 18px;
}

.delete-card__title h2 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--label);
  letter-spacing: 0.01em;
}

.delete-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.delete-field {
  min-width: 0;
}

.delete-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--label);
}

.delete-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.delete-control.is-open {
  z-index: 40;
}

.delete-control--date {
  font: inherit;
  color: inherit;
  cursor: pointer;
  justify-content: space-between;
}

.delete-control--date strong {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}

.delete-control--date svg {
  width: 18px;
  height: 18px;
  color: var(--teal-header);
  flex-shrink: 0;
}

.delete-control__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #7c3aed;
}

.delete-control__icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.delete-control .custom-select {
  flex: 1;
  min-width: 0;
  position: relative;
}

.custom-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.custom-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.custom-select__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -40px;
  right: -10px;
  z-index: 100;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-header) #e2eef0;
}

.custom-select__menu::-webkit-scrollbar {
  width: 8px;
}

.custom-select__menu::-webkit-scrollbar-track {
  background: #e8f4f4;
  border-radius: 999px;
  margin: 6px 0;
}

.custom-select__menu::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0d9488, var(--teal-header));
  border-radius: 999px;
  border: 2px solid #e8f4f4;
  min-height: 28px;
}

.custom-select__menu::-webkit-scrollbar-thumb:hover {
  background: var(--teal-header);
}

.custom-select__option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.custom-select__option:hover {
  background: #e8f6f6;
  color: var(--teal-header);
}

.custom-select__option.is-selected {
  background: var(--teal-header);
  color: #fff;
}

.delete-message {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.delete-message.hidden {
  display: none;
}

.delete-message.error {
  background: #fee2e2;
  color: #991b1b;
}

.delete-message.success {
  background: #dcfce7;
  color: #166534;
}

.btn-delete-jantri {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: none;
  border-radius: 12px;
  background: var(--danger);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.btn-delete-jantri svg {
  width: 18px;
  height: 18px;
}

.btn-delete-jantri:active:not(:disabled) {
  transform: scale(0.99);
  background: var(--danger-dark);
}

.btn-delete-jantri:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  background: #9ca3af;
}

.delete-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 50;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.delete-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 8px 4px 10px;
  background: var(--teal-header);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-item.active {
  color: var(--nav-active);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.nav-item__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.nav-item__icon--jantri {
  -webkit-mask-image: url("../assets/icons/game.svg");
  mask-image: url("../assets/icons/game.svg");
}

.nav-item__icon--cutting {
  -webkit-mask-image: url("../assets/icons/cutting.svg");
  mask-image: url("../assets/icons/cutting.svg");
}

.nav-item__icon--result {
  -webkit-mask-image: url("../assets/icons/result.svg");
  mask-image: url("../assets/icons/result.svg");
}

.nav-item__icon--hisab {
  -webkit-mask-image: url("../assets/icons/hisab.svg");
  mask-image: url("../assets/icons/hisab.svg");
}

.nav-item__icon--lenden {
  -webkit-mask-image: url("../assets/icons/lenden.svg");
  mask-image: url("../assets/icons/lenden.svg");
}

.nav-item__icon--delete {
  -webkit-mask-image: url("../assets/icons/delete.svg");
  mask-image: url("../assets/icons/delete.svg");
}

.nav-item__icon--menu {
  -webkit-mask-image: url("../assets/icons/menu.svg");
  mask-image: url("../assets/icons/menu.svg");
}

.date-picker,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 12px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.date-picker.is-open,
.confirm-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.date-picker.is-closing,
.confirm-modal.is-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
}

.date-picker[hidden],
.confirm-modal[hidden] {
  display: none !important;
}

.date-picker__backdrop,
.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 32, 32, 0.55);
}

.date-picker__panel,
.confirm-modal__panel {
  position: relative;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  transform: translateY(14px) scale(0.94);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.date-picker.is-open .date-picker__panel,
.confirm-modal.is-open .confirm-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.date-picker.is-closing .date-picker__panel,
.confirm-modal.is-closing .confirm-modal__panel {
  transform: translateY(10px) scale(0.96);
  opacity: 0;
}

.confirm-modal {
  align-items: center;
  padding: 20px 12px;
}

.confirm-modal__panel {
  padding: 22px 18px;
  text-align: center;
}

.confirm-modal__icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.confirm-modal__panel h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.confirm-modal__panel p {
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

.confirm-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-confirm-cancel,
.btn-confirm-ok {
  min-height: 42px;
  border: none;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-confirm-cancel {
  background: #e2e8f0;
  color: #334155;
}

.btn-confirm-ok {
  background: var(--danger);
  color: #fff;
}

.date-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--teal-header);
  color: #fff;
}

.date-picker__head h2 {
  font-size: 0.95rem;
  font-weight: 800;
}

.date-picker__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.date-picker__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px;
}

.date-picker__nav {
  width: 36px;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.date-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px 12px 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px 12px 12px;
}

.date-picker__day {
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.date-picker__day.is-muted {
  color: #cbd5e1;
}

.date-picker__day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--teal-header);
}

.date-picker__day.is-selected {
  background: var(--teal-header);
  color: #fff;
}

.date-picker__footer {
  padding: 0 12px 14px;
  text-align: center;
}

.date-picker__today {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: #0d7373;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 900px) {
  .delete-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 14px 16px 24px;
  }

  .delete-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
  }

  .delete-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
  }

  .delete-card {
    padding: 18px;
  }

  .btn-delete-jantri {
    margin-top: 4px;
  }
}
