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

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

:root {
  --teal-dark: #0b4f4f;
  --teal-header: #0a5c5c;
  --teal-btn: #1d835f;
  --teal-light: #1f8f8f;
  --bg-page: #eef2f6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --red: #e62e4d;
  --red-soft: #f87171;
  --orange: #f5a623;
  --save-bg: #8b8680;
  --save-green: #1d835f;
  --saved-green: #86efac;
  --saved-green-dark: #22c55e;
  --add-green-bg: #e8f5e9;
  --add-green-border: #22c55e;
  --saved-text: #14532d;
  --active-bg: #ecfdf5;
  --share: #22c55e;
  --gallery: #8b5cf6;
  --nav-active: #ffd54f;
}

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

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

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--teal-header);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-bar__left,
.top-bar__center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-clear-top {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1.5px solid rgb(23, 113, 113);
  border-radius: 999px;
  background: transparent;
  color: #4f9b9b;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-clear-top.has-values {
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}

.btn-clear-top.is-date-mode {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-clear-top__mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-clear-top__mode[hidden] {
  display: none !important;
}

.btn-clear-top svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn--share {
  background: var(--share);
  color: #fff;
}

.icon-btn--gallery {
  background: var(--gallery);
  color: #fff;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #0a5c5c;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px #156d6d;
}

.btn-save.has-values {
  background: var(--red);
}

.btn-save.is-saved {
  background: var(--save-green);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.45);
}

.btn-save svg {
  width: 16px;
  height: 16px;
}

.dashboard {
  padding: 10px 6px;
  max-width: 100%;
  margin: 0 auto;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel-left > .panel-card:first-child {
  padding: 10px;
}

.panel-card .select-row {
  margin-bottom: 0;
}

.panel-left,
.panel-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.panel-right {
  container-type: inline-size;
  container-name: form-panel;
}

.select-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--card);
  border: 1.5px solid var(--teal-light);
  border-radius: 12px;
}

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

.select-box .custom-select {
  flex: 1;
  min-width: 0;
}

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

.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%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.custom-select__trigger:focus-visible {
  outline: none;
  border-color: var(--teal-btn);
  box-shadow: 0 0 0 3px rgba(29, 131, 95, 0.2);
}

.custom-select--sm {
  min-width: 110px;
}

.custom-select--flat .custom-select__trigger {
  height: auto;
  min-height: 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.85rem;
}

.custom-select--flat .custom-select__trigger:focus-visible {
  box-shadow: none;
  outline: 2px solid rgba(29, 131, 95, 0.35);
  outline-offset: 2px;
}

.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% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(5, 102, 105, 0.589) rgba(8, 92, 92, 0.08);
}

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

.custom-select__menu::-webkit-scrollbar-track {
  background: rgba(9, 83, 83, 0.08);
  border-radius: 999px;
}

.custom-select__menu::-webkit-scrollbar-thumb {
  background: rgba(9, 83, 83, 0.45);
  border-radius: 999px;
}

.custom-select__menu::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 83, 83, 0.65);
}

.custom-select--flat .custom-select__menu {
  left: -8px;
  right: -8px;
}

.custom-select__option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-select__option:hover,
.custom-select__option.is-focused {
  background: #ecfdf5;
  color: var(--teal-btn);
}

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

.custom-select__option.is-selected:hover,
.custom-select__option.is-selected.is-focused {
  background: #167a56;
  color: #fff;
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.form-panel .check-label,
.form-panel .entry-sep,
.form-panel .btn-done,
.form-panel .btn-clear,
.form-panel .haruf-label,
.form-panel .haruf-num {
  font-weight: 800;
  color: #121212;
}

.form-panel input::placeholder {
  font-weight: 700;
  color: #94a3b8;
}

.form-panel textarea::placeholder,
.bulk-text::placeholder {
  font-size: 0.72rem;
  font-weight: 400;
  color: #b9c5d5;
  opacity: 1;
}

.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-card {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  isolation: isolate;
}

.panel-card:has(.custom-select) {
  overflow: visible;
}

.panel-card.dropdown-open {
  overflow: visible;
  position: relative;
  z-index: 50;
}

.jantri-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
}

.jantri-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.jantri-num {
  font-size: 0.5rem;
  font-weight: 800;
  color: #121212;
  line-height: 1;
}

.jantri-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  min-height: 18px;
  border-radius: 999px;
  border: 1px solid var(--red-soft);
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jantri-cell input {
  width: 100%;
  min-width: 0;
  height: 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #121212;
  outline: none;
}

.jantri-cell.has-add .jantri-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 2px;
  background: #86efac5c;
  border-color: var(--saved-green-dark);
  overflow: hidden;
}

.jantri-cell.has-add.is-active .jantri-box {
  border-width: 2.5px;
}

.jantri-cell.has-add .cell-add-prev {
  position: relative;
  z-index: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  direction: rtl;
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--saved-text);
  pointer-events: none;
}

.jantri-cell.has-add .cell-add-prev__text {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.jantri-cell.has-add .cell-add-new {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  min-width: 0.7em;
  padding: 0;
  overflow: visible;
  white-space: nowrap;
  text-align: left;
  direction: ltr;
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--saved-text);
  pointer-events: none;
}

.jantri-cell.has-add.has-add-long .cell-add-prev,
.jantri-cell.has-add.has-add-long .cell-add-new {
  font-size: 0.42rem;
}

.jantri-cell.has-add input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: var(--saved-text);
  text-align: center;
  font-size: 0.52rem;
  font-weight: 800;
  -webkit-text-fill-color: transparent;
}

.cell-add-prev {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  color: #121212;
  line-height: 1;
  white-space: nowrap;
}

.jantri-cell.is-active:not(.has-add) .jantri-box {
  border: 3px solid var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 46, 77, 0.28);
}

.jantri-cell.is-active:not(.has-add) .jantri-num {
  color: #121212;
}

.jantri-cell.is-active:not(.has-add) input {
  color: #121212;
}

.jantri-cell.is-saved.is-active:not(.has-add) .jantri-box {
  border: 3px solid var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 46, 77, 0.28);
}

.jantri-cell.is-saved.is-active:not(.has-add) .jantri-num,
.jantri-cell.is-saved.is-active:not(.has-add) input {
  color: #121212;
}

.jantri-cell.is-saved .jantri-box {
  background: var(--saved-green);
  border-color: var(--saved-green-dark);
}

.jantri-cell.is-saved .jantri-num {
  color: #121212;
  font-weight: 800;
}

.jantri-cell.is-saved input {
  color: #121212;
  font-weight: 800;
}

.haruf-card {
  padding: 8px 6px;
}

#haruf-ah {
  background: #fafffc;
  padding: 6px 4px 8px;
  border-bottom: 1px solid var(--border);
}

#haruf-ah .haruf-box {
  border: 1.5px solid var(--teal-btn);
}

#haruf-bh {
  background: #fffbfc;
  border-radius: 10px;
  padding: 8px 4px 6px;
  margin-top: 0;
}

.haruf-row {
  display: grid;
  grid-template-columns: 34px repeat(10, minmax(0, 1fr));
  gap: 2px;
  align-items: end;
}

.haruf-row + .haruf-row {
  margin-top: 6px;
}

.haruf-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  padding-bottom: 4px;
}

.haruf-label--ah {
  color: var(--teal-btn);
}

.haruf-label--bh {
  color: var(--red);
}

.haruf-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.haruf-num {
  font-size: 0.5rem;
  font-weight: 800;
  color: #121212;
  line-height: 1;
}

.haruf-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  min-height: 18px;
  border-radius: 999px;
  border: 1px solid var(--red-soft);
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.haruf-cell--ah .haruf-box {
  border-color: var(--teal-btn);
}

.haruf-cell--bh .haruf-box {
  border-color: var(--red);
}

.haruf-cell input {
  width: 100%;
  height: 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #121212;
  outline: none;
}

.haruf-cell.is-active:not(.has-add) .haruf-box {
  border: 3px solid var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 46, 77, 0.28);
}

.haruf-cell.is-active:not(.has-add) .haruf-num {
  color: #121212;
}

.haruf-cell.is-active:not(.has-add) input {
  color: #121212;
}

.haruf-cell.is-saved.is-active:not(.has-add) .haruf-box {
  border: 3px solid var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 46, 77, 0.28);
}

.haruf-cell.is-saved.is-active:not(.has-add) .haruf-num,
.haruf-cell.is-saved.is-active:not(.has-add) input {
  color: #121212;
}

.haruf-cell.is-saved .haruf-box {
  background: var(--saved-green);
  border-color: var(--saved-green-dark);
}

.haruf-cell.is-saved .haruf-num {
  color: #121212;
  font-weight: 800;
}

.haruf-cell.is-saved input {
  color: #121212;
  font-weight: 800;
}

.haruf-cell.has-add .haruf-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 2px;
  background: var(--saved-green);
  border-color: var(--saved-green-dark);
  overflow: hidden;
}

.haruf-cell.has-add.is-active .haruf-box {
  border-width: 2.5px;
}

.haruf-cell.has-add .cell-add-prev {
  position: relative;
  z-index: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  direction: rtl;
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--saved-text);
  pointer-events: none;
}

.haruf-cell.has-add .cell-add-prev__text {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.haruf-cell.has-add .cell-add-new {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  min-width: 0.7em;
  padding: 0;
  overflow: visible;
  white-space: nowrap;
  text-align: left;
  direction: ltr;
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--saved-text);
  pointer-events: none;
}

.haruf-cell.has-add.has-add-long .cell-add-prev,
.haruf-cell.has-add.has-add-long .cell-add-new {
  font-size: 0.42rem;
}

.haruf-cell.has-add input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: var(--saved-text);
  text-align: center;
  font-size: 0.52rem;
  font-weight: 800;
  -webkit-text-fill-color: transparent;
}

.entry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.entry-row.row-saved,
.bulk-card.row-saved {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.field-sm,
.field-md,
.entry-row select {
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-panel .field-sm:focus,
.form-panel .field-md:focus,
.form-panel .bulk-text:focus {
  border-color: #0a5c5c;
  border-width: 2.5px;
  box-shadow: 0 0 0 3px rgba(10, 92, 92, 0.22);
}

.form-panel .field-group:focus-within {
  border-color: #0a5c5c;
  border-width: 2.5px;
  box-shadow: 0 0 0 3px rgba(10, 92, 92, 0.22);
}

.form-panel .field-group--split:focus-within {
  border-color: var(--border);
  border-width: 1.5px;
  box-shadow: none;
}

.form-panel .field-group--split.is-active-start .field-group__input--start,
.form-panel .field-group--split .field-group__input--start:focus {
  background: #f0fdf9;
  box-shadow: none;
  border: 2px solid #0a5c5c;
  border-right: none;
  border-radius: 999px 0 0 999px;
  margin: -1px 0 -1px -1px;
  z-index: 1;
  position: relative;
}

.form-panel .field-group--split.is-active-end .field-group__input--end,
.form-panel .field-group--split .field-group__input--end:focus {
  background: #f0fdf9;
  box-shadow: none;
  border: 2px solid #0a5c5c;
  border-left: none;
  border-radius: 0 999px 999px 0;
  margin: -1px -1px -1px 0;
  z-index: 1;
  position: relative;
}

.form-panel .field-group--split .field-group__input {
  transition: background 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.form-panel .field-group--split .field-group__input--start,
.form-panel .field-group--split .field-group__input--end {
  border-radius: 0;
}

.form-panel .entry-row .field-group--split {
  padding: 0;
}

.form-panel .custom-select.is-open .custom-select__trigger,
.form-panel .custom-select__trigger:focus-visible {
  border-color: #0a5c5c;
  border-width: 2.5px;
  box-shadow: 0 0 0 3px rgba(10, 92, 92, 0.22);
}

.form-panel .custom-select__option:hover,
.form-panel .custom-select__option.is-focused {
  background: #ecfdf5;
  color: #0a5c5c;
}

.form-panel .custom-select__option.is-selected {
  background: #0a5c5c;
  color: #fff;
}

.form-panel .custom-select__option.is-selected:hover,
.form-panel .custom-select__option.is-selected.is-focused {
  background: #084f4f;
  color: #fff;
}

.field-sm {
  flex: 1;
  min-width: 70px;
}

.field-md {
  flex: 2;
  min-width: 120px;
}

.entry-row select {
  min-width: 110px;
  cursor: pointer;
}

.entry-row .custom-select {
  flex: 1;
  min-width: 70px;
}

.entry-row .custom-select--sm {
  min-width: 110px;
}

.entry-sep {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.field-group {
  display: flex;
  align-items: stretch;
  flex: 2;
  min-width: 140px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group__input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: none;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  background: transparent;
}

.field-group__input::placeholder {
  font-weight: 700;
  color: #64748b;
}

.field-group__sep {
  display: grid;
  place-items: center;
  min-width: 28px;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  background: #f8fafc;
}

.btn-done {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: #067f10;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn-clear {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.bulk-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
}

.bulk-text-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: visible;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.bulk-text {
  width: 100%;
  flex: 1 1 auto;
  min-height: 120px;
  height: 100%;
  border: 1.5px solid #64748b;
  border-radius: 12px;
  padding: 10px;
  padding-right: 14px;
  padding-bottom: 26px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-btn) #e2e8f0;
  position: relative;
  z-index: 0;
}

.bulk-text::-webkit-resizer {
  display: none;
}

.bulk-text::-webkit-scrollbar {
  width: 6px;
}

.bulk-text::-webkit-scrollbar-track {
  margin: 10px 0 24px;
  background: #e8eef5;
  border-radius: 999px;
}

.bulk-text::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--teal-light), var(--teal-btn));
  border-radius: 999px;
  border: none;
  min-height: 28px;
}

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

.bulk-text::-webkit-scrollbar-corner {
  background: transparent;
}

.bulk-resize-grip {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  z-index: 3;
  touch-action: none;
  line-height: 0;
}

.bulk-resize-grip svg {
  width: 12px;
  height: 12px;
  display: block;
  pointer-events: none;
}

.bulk-resize-grip:active,
.bulk-resize-grip.is-dragging {
  background: transparent;
  color: #0f172a;
}

.bulk-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  align-self: stretch;
  gap: 8px;
  min-width: 100px;
  max-width: 120px;
  width: auto;
  flex-shrink: 0;
  min-height: 100%;
}

.bulk-actions > .btn-done,
.bulk-actions > .btn-clear,
.bulk-actions > .check-label--palat,
.bulk-actions > .bulk-palat-form {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.bulk-palat-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.bulk-palat-form[hidden] {
  display: none !important;
}

.bulk-palat-amount {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.check-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  cursor: pointer;
  outline: none;
}

.check-label--inline {
  white-space: nowrap;
}

.check-label--palat {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 0.1rem solid #b9c5d5;
  background: #fff;
  gap: 6px;
  color: #334155;
}

.check-label--palat input {
  width: 14px;
  height: 14px;
  border: 2px solid #94a3b8;
  border-radius: 3px;
  background: #fff;
}

.check-label--palat input:checked {
  background-color: #0a5c5c;
  border-color: #0a5c5c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.check-label--palat:focus-within {
  box-shadow: 0 0 0 2px rgba(10, 92, 92, 0.2);
}

.bulk-actions .check-label--palat {
  justify-content: center;
}

.check-label--jc,
.check-label--wp {
  flex-shrink: 0;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2.5px solid;
  gap: 4px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
}

.check-label--jc {
  border-color: #f87171;
  background: #fffafb;
  color: #e62e4d;
}

.check-label--jc input {
  width: 14px;
  height: 14px;
  border: 2px solid #ef4444;
  border-radius: 3px;
  background: #fff;
}

.check-label--jc input:checked {
  background-color: #e62e4d;
  border-color: #e62e4d;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.check-label--jc:focus-within {
  box-shadow: 0 0 0 2px rgba(230, 46, 77, 0.22);
}

.check-label--wp {
  border-color: #2dd4bf;
  background: #fafffc;
  color: #0d9488;
}

.check-label--wp input {
  width: 14px;
  height: 14px;
  border: 2px solid #14b8a6;
  border-radius: 3px;
  background: #fff;
}

.check-label--wp input:checked {
  background-color: #0d9488;
  border-color: #0d9488;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.check-label--wp:focus-within {
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.22);
}

.check-label--wp .check-label__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 5px;
  border: 1.5px solid rgba(20, 184, 166, 0.55);
  border-radius: 5px;
  line-height: 1.1;
}

.btn-history {
  display: none;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-only {
  display: none !important;
}

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

.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 svg,
.nav-item i,
.nav-item__icon {
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item__icon {
  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");
}

.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.active svg,
.nav-item.active i,
.nav-item.active .nav-item__icon {
  filter: drop-shadow(0 0 4px rgba(255, 213, 79, 0.5));
}

.desktop-only {
  display: none !important;
}

@media (max-width: 899px) {
  .dashboard {
    padding: 4px 6px;
  }

  .dashboard-layout {
    gap: 2px;
  }

  .panel-left,
  .panel-right {
    gap: 2px;
  }

  .panel-card {
    border-radius: 8px;
  }

  .panel-left > .panel-card:first-child {
    padding: 2px 4px;
  }

  .select-row {
    gap: 4px;
  }

  .select-box {
    padding: 4px 6px;
    gap: 4px;
    border-radius: 8px;
  }

  .select-box svg {
    width: 14px;
    height: 14px;
  }

  .select-box .custom-select--flat .custom-select__trigger {
    min-height: 16px;
    font-size: 0.72rem;
  }

  .jantri-grid {
    padding: 2px 3px;
    gap: 2px;
  }

  /* Mobile: pehle jaisa — ek line, chota fixed font (PC fit nahi) */
  .jantri-cell.has-add .jantri-box,
  .haruf-cell.has-add .haruf-box {
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 1px;
  }

  .jantri-cell.has-add .cell-add-prev,
  .jantri-cell.has-add .cell-add-new,
  .jantri-cell.has-add input,
  .haruf-cell.has-add .cell-add-prev,
  .haruf-cell.has-add .cell-add-new,
  .haruf-cell.has-add input {
    font-size: 0.48rem !important;
  }

  .jantri-cell.has-add.has-add-long .cell-add-prev,
  .jantri-cell.has-add.has-add-long .cell-add-new,
  .haruf-cell.has-add.has-add-long .cell-add-prev,
  .haruf-cell.has-add.has-add-long .cell-add-new {
    font-size: 0.4rem !important;
  }

  .haruf-card {
    padding: 3px 4px;
  }

  .haruf-row + .haruf-row {
    margin-top: 2px;
  }

  .entry-row,
  .bulk-card {
    padding: 3px 5px;
    gap: 3px;
  }

  .bulk-card {
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
  }

  .bulk-text-wrap {
    flex: 1;
    min-width: 0;
  }

  .bulk-text {
    width: 100%;
    min-height: 100px;
    padding: 6px 8px;
    padding-bottom: 20px;
  }

  .bulk-resize-grip {
    right: 1px;
    bottom: 1px;
    cursor: ns-resize;
  }

  .bulk-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    align-self: stretch;
    width: auto;
    min-width: 70px;
    max-width: 88px;
    gap: 6px;
    min-height: 100%;
  }

  .bulk-actions > .btn-done,
  .bulk-actions > .btn-clear,
  .bulk-actions > .check-label--palat,
  .bulk-actions > .bulk-palat-form {
    flex: 0 0 auto;
  }

  .bulk-actions .btn-done,
  .bulk-actions .btn-clear {
    width: 100%;
    min-width: 0;
    padding: 6px 6px;
    font-size: 0.62rem;
  }

  .bulk-actions .check-label--palat {
    width: 100%;
    min-height: 32px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.58rem;
    gap: 4px;
    white-space: nowrap;
  }

  .bulk-palat-amount {
    width: 100%;
    min-width: 0;
  }

  .form-panel .entry-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .form-panel .entry-row .field-md,
  .form-panel .entry-row .field-sm,
  .form-panel .entry-row .field-group {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-panel .entry-row select {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-panel .entry-row .custom-select {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-panel .entry-row .field-group {
    flex: 1.4 1 0;
  }

  .form-panel .entry-row .field-sm {
    flex: 0.7 1 0;
    min-width: 44px;
  }

  .form-panel .entry-row .field-md,
  .form-panel .entry-row .field-sm,
  .form-panel .entry-row select,
  .form-panel .entry-row .custom-select__trigger,
  .form-panel .entry-row .field-group {
    height: 32px;
    padding: 0 6px;
    font-size: 0.65rem;
    border-radius: 10px;
  }

  .form-panel .entry-row .field-group--split {
    padding: 0;
  }

  .form-panel .entry-row .field-group--split .field-group__input {
    height: 32px;
    padding: 0 6px;
    font-size: 0.65rem;
    border-radius: 0;
  }

  .form-panel .field-group--split.is-active-start .field-group__input--start,
  .form-panel .field-group--split .field-group__input--start:focus {
    border-radius: 10px 0 0 10px;
  }

  .form-panel .field-group--split.is-active-end .field-group__input--end,
  .form-panel .field-group--split .field-group__input--end:focus {
    border-radius: 0 10px 10px 0;
  }

  .form-panel .entry-row .field-group__sep {
    min-width: 22px;
    padding: 0 2px;
    font-size: 0.62rem;
  }

  .form-panel .entry-row .check-label {
    flex-shrink: 0;
    font-size: 0.65rem;
    gap: 3px;
  }

  .form-panel .entry-row .check-label--jc,
  .form-panel .entry-row .check-label--wp {
    height: 32px;
    padding: 0 6px;
    gap: 3px;
    border-radius: 10px;
  }

  .form-panel .entry-row .check-label--wp .check-label__mark {
    border-radius: 6px;
  }

  .form-panel .entry-row .check-label input {
    width: 13px;
    height: 13px;
  }

  .form-panel .entry-row .btn-done {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .form-panel .bulk-text,
  .form-panel .btn-done,
  .form-panel .btn-clear {
    border-radius: 10px;
  }

  .btn-history.mobile-only {
    display: inline-flex !important;
    margin-top: 0;
    padding: 8px;
    font-size: 0.78rem;
    border-radius: 8px;
  }
}

@media (min-width: 900px) {
  body.home-app {
    padding-bottom: 80px;
  }

  .top-bar {
    padding: 10px 12px;
    gap: 12px;
  }

  .balance {
    font-size: 1.25rem;
  }

  .dashboard {
    padding: 10px 8px;
  }

  .dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 12px;
    align-items: start;
  }

  .panel-left {
    position: sticky;
    top: 52px;
    align-self: start;
  }

  .panel-left,
  .panel-right {
    gap: 10px;
  }

  .form-panel .entry-row {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px;
  }

  .form-panel .entry-row .field-md,
  .form-panel .entry-row .field-sm,
  .form-panel .entry-row .field-group {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-panel .entry-row .field-group {
    flex: 1.5 1 0;
  }

  .form-panel .entry-row .field-sm {
    flex: 0.75 1 0;
    min-width: 56px;
  }

  .form-panel .entry-row .custom-select {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-panel .entry-row .btn-done {
    flex-shrink: 0;
  }

  @container form-panel (max-width: 520px) {
    .form-panel .entry-row {
      flex-wrap: wrap;
    }

    .form-panel .entry-row .check-label--jc,
    .form-panel .entry-row .check-label--wp {
      flex-shrink: 0;
    }
  }

  .jantri-grid {
    gap: 3px;
    padding: 8px;
  }

  .jantri-num {
    font-size: 0.56rem;
  }

  .jantri-cell input {
    height: 22px;
    font-size: 0.9rem;
  }

  .jantri-box {
    min-height: 24px;
  }

  .jantri-cell.fit-lg:not(.has-add) input,
  .haruf-cell.fit-lg:not(.has-add) input {
    font-size: 0.95rem;
  }

  .jantri-cell.fit-md:not(.has-add) input,
  .haruf-cell.fit-md:not(.has-add) input {
    font-size: 0.85rem;
  }

  .jantri-cell.fit-sm:not(.has-add) input,
  .haruf-cell.fit-sm:not(.has-add) input {
    font-size: 0.72rem;
  }

  .jantri-cell.fit-xs:not(.has-add) input,
  .haruf-cell.fit-xs:not(.has-add) input {
    font-size: 0.58rem;
  }

  .jantri-cell.fit-xxs:not(.has-add) input,
  .haruf-cell.fit-xxs:not(.has-add) input {
    font-size: 0.46rem;
  }

  .jantri-cell.has-add .jantri-box,
  .haruf-cell.has-add .haruf-box {
    padding: 0 3px;
    gap: 1px;
  }

  .jantri-cell.has-add .cell-add-prev,
  .jantri-cell.has-add .cell-add-new,
  .haruf-cell.has-add .cell-add-prev,
  .haruf-cell.has-add .cell-add-new {
    font-size: 0.82rem;
  }

  .jantri-cell.has-add.fit-lg .cell-add-prev,
  .jantri-cell.has-add.fit-lg .cell-add-new,
  .haruf-cell.has-add.fit-lg .cell-add-prev,
  .haruf-cell.has-add.fit-lg .cell-add-new {
    font-size: 0.88rem;
  }

  .jantri-cell.has-add.fit-md .cell-add-prev,
  .jantri-cell.has-add.fit-md .cell-add-new,
  .haruf-cell.has-add.fit-md .cell-add-prev,
  .haruf-cell.has-add.fit-md .cell-add-new {
    font-size: 0.78rem;
  }

  .jantri-cell.has-add.fit-sm .cell-add-prev,
  .jantri-cell.has-add.fit-sm .cell-add-new,
  .haruf-cell.has-add.fit-sm .cell-add-prev,
  .haruf-cell.has-add.fit-sm .cell-add-new {
    font-size: 0.68rem;
  }

  .jantri-cell.has-add.fit-xs .cell-add-prev,
  .jantri-cell.has-add.fit-xs .cell-add-new,
  .haruf-cell.has-add.fit-xs .cell-add-prev,
  .haruf-cell.has-add.fit-xs .cell-add-new {
    font-size: 0.55rem;
  }

  .jantri-cell.has-add.fit-xxs .cell-add-prev,
  .jantri-cell.has-add.fit-xxs .cell-add-new,
  .haruf-cell.has-add.fit-xxs .cell-add-prev,
  .haruf-cell.has-add.fit-xxs .cell-add-new {
    font-size: 0.44rem;
  }

  .haruf-row {
    grid-template-columns: 40px repeat(10, minmax(0, 1fr));
    gap: 3px;
  }

  .haruf-cell input {
    height: 22px;
    font-size: 0.9rem;
  }

  .haruf-box {
    min-height: 24px;
  }

  .bulk-card {
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
  }

  .bulk-text-wrap {
    flex: 1;
    min-width: 0;
  }

  .bulk-text {
    width: 100%;
    min-height: 140px;
  }

  .bulk-resize-grip {
    right: 1px;
    bottom: 1px;
    cursor: ns-resize;
  }

  .bulk-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    align-self: stretch;
    width: auto;
    min-width: 110px;
    max-width: 120px;
    gap: 8px;
    min-height: 100%;
  }

  .bulk-actions > .btn-done,
  .bulk-actions > .btn-clear,
  .bulk-actions > .check-label--palat,
  .bulk-actions > .bulk-palat-form {
    flex: 0 0 auto;
  }

  .bulk-actions .btn-done,
  .bulk-actions .btn-clear {
    width: 100%;
  }

  .bulk-actions .check-label--palat {
    width: 100%;
  }

  .bulk-palat-amount {
    width: 100%;
    min-width: 0;
  }

  .desktop-only {
    display: flex !important;
  }

  .mobile-only {
    display: none !important;
  }

  .btn-history.desktop-only {
    display: inline-flex !important;
  }

  .nav-item {
    font-size: 0.65rem;
  }

  .nav-item svg,
  .nav-item i,
  .nav-item__icon {
    width: 22px;
    height: 22px;
    font-size: 20px;
  }
}

@media (min-width: 1200px) {
  .top-bar {
    padding: 10px 14px;
  }

  .balance {
    font-size: 1.35rem;
  }

  .dashboard {
    padding: 12px 10px;
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 14px;
  }

  .panel-left,
  .panel-right {
    gap: 12px;
  }

  .form-panel .entry-row {
    padding: 14px;
    gap: 12px;
  }

  .field-sm,
  .field-md,
  .entry-row select,
  .field-group__input {
    height: 38px;
    font-size: 0.86rem;
  }

  .field-group {
    min-width: 160px;
  }

  .btn-done {
    padding: 9px 20px;
    font-size: 0.84rem;
  }

  .btn-history.desktop-only {
    padding: 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .balance {
    font-size: 1.05rem;
  }

  .btn-save {
    padding: 5px 8px;
    font-size: 0.7rem;
  }

  .jantri-num {
    font-size: 0.46rem;
  }

  .nav-item {
    font-size: 0.52rem;
  }
}

body.menu-open {
  overflow: hidden;
}

.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.menu-drawer.is-open,
.menu-drawer.is-closing {
  pointer-events: auto;
}

.menu-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.menu-drawer.is-open .menu-drawer__backdrop,
.menu-drawer.is-closing .menu-drawer__backdrop {
  opacity: 1;
}

.menu-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 360px);
  background: #eef2f6;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.18);
}

.menu-drawer.is-open .menu-drawer__panel {
  transform: translateX(0);
}

.menu-drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.menu-drawer__close svg {
  width: 18px;
  height: 18px;
}

.menu-drawer__profile {
  position: relative;
  padding: 16px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0a5c5c, #0d7070);
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 92, 92, 0.25);
}

.menu-drawer__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.menu-drawer__user strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.menu-drawer__user span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  opacity: 0.9;
}

.menu-drawer__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
}

.menu-drawer__badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.menu-drawer__badge--warn {
  background: #ffd54f;
  color: #1f2937;
}

.menu-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-drawer__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-drawer__item:active {
  transform: scale(0.98);
}

.menu-drawer__item--stack {
  align-items: flex-start;
}

.menu-drawer__item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.menu-drawer__item-text small {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.menu-drawer__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.menu-drawer__icon svg {
  width: 18px;
  height: 18px;
}

.menu-drawer__icon--teal {
  background: #ecfdf5;
  color: #1d835f;
}

.menu-drawer__icon--orange {
  background: #fff7ed;
  color: #ea580c;
}

.menu-drawer__icon--gold {
  background: #fefce8;
  color: #ca8a04;
}

.menu-drawer__icon--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.menu-drawer__icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.menu-drawer__icon--pink {
  background: #fdf2f8;
  color: #db2777;
}

.menu-drawer__icon--slate {
  background: #f1f5f9;
  color: #475569;
}

.menu-drawer__tag {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.menu-drawer__tag--gold {
  background: #fef3c7;
  color: #92400e;
}

.menu-drawer__tag--purple {
  background: #ede9fe;
  color: #6d28d9;
}

.menu-drawer__logout {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-radius: 14px;
  background: #ef4444;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.menu-drawer__logout svg {
  width: 18px;
  height: 18px;
}

.app-toast {
  position: fixed;
  top: 64px;
  left: 50%;
  z-index: 80;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  background: #0a5c5c;
}

.app-toast--error {
  background: var(--red);
}

.app-toast--success {
  background: #067f10;
}

body.history-open {
  overflow: hidden;
}

.history-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  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;
}

.history-modal[hidden] {
  display: none !important;
}

.history-modal.is-open,
.history-modal.is-closing {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.history-modal.is-closing {
  opacity: 0;
}

.history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 32, 32, 0.55);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.history-modal.is-open .history-modal__backdrop,
.history-modal.is-closing .history-modal__backdrop {
  opacity: 1;
}

.history-modal.is-closing .history-modal__backdrop {
  opacity: 0;
}

.history-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(82vh, 720px);
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.history-modal.is-open .history-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.history-modal.is-closing .history-modal__panel {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.history-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--teal-header);
  color: #fff;
}

.history-modal__head h2 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.history-modal__sub {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.history-modal__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.history-modal__close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.history-modal__body {
  overflow: auto;
  padding: 14px;
  background: #f4f7fa;
  scrollbar-width: thin;
  scrollbar-color: #0a5c5c #e8eef2;
}

.history-modal__body::-webkit-scrollbar {
  width: 6px;
}

.history-modal__body::-webkit-scrollbar-track {
  margin: 6px 0;
  background: #e8eef2;
  border-radius: 999px;
}

.history-modal__body::-webkit-scrollbar-thumb {
  background: #0a5c5c;
  border-radius: 999px;
  min-height: 28px;
}

.history-modal__body::-webkit-scrollbar-thumb:hover {
  background: #084f4f;
}

.history-modal__body::-webkit-scrollbar-corner {
  background: transparent;
}

.history-modal--records .history-modal__panel {
  width: min(720px, calc(100% - 20px));
  background: #fff;
}

.history-modal--sm .history-modal__panel {
  width: min(380px, 100%);
  max-height: min(70vh, 520px);
  border-radius: 12px;
}

.history-modal--records .history-modal__head {
  background: #fff;
  color: var(--teal-header);
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  padding: 12px 14px;
}

.history-modal--records .history-modal__head h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--teal-header);
  letter-spacing: 0;
}

.history-modal--records .history-modal__sub {
  color: #64748b;
  font-weight: 600;
  font-size: 0.68rem;
}

.history-modal--records .history-modal__close {
  background: transparent;
  color: #94a3b8;
}

.history-modal--records .history-modal__close:hover {
  color: #475569;
  background: #f1f5f9;
}

.history-modal--records .history-modal__body {
  background: #fff;
  padding: 12px 14px 16px;
}

.history-modal--sm .history-empty {
  min-height: 140px;
  padding: 28px 12px;
  font-size: 0.68rem;
  color: #c8d0d8;
}

.history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 40px 16px;
  text-align: center;
  color: #c8d0d8;
  font-size: 0.72rem;
  font-weight: 600;
}

.history-empty-inline {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.history-record {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
}

.history-record__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.history-record__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.history-record__left > strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.history-record__time {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.history-record__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.history-record__btn svg {
  width: 13px;
  height: 13px;
}

.history-record__btn--copy {
  background: #e7f8ef;
  border-color: #b7ebc9;
  color: #0f766e;
}

.history-record__btn--delete {
  background: #fde8e8;
  border-color: #f5c2c2;
  color: #dc2626;
}

.history-record__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}

.history-record__total strong {
  font-weight: 800;
}

.history-record__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.history-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border-radius: 6px;
  background: #e8f1fb;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .history-record__tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .history-tag {
    min-width: 0;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .history-tag__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .history-tag__x {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    font-size: 0.85rem;
  }
}

.history-tag__x {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #ef4444;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.history-tag__x:hover {
  background: rgba(239, 68, 68, 0.12);
}

.history-batch {
  margin-bottom: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.history-batch__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--teal-header);
}

.history-batch__meta {
  margin: 6px 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-chip {
  display: inline-flex;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0a5c5c;
  font-size: 0.68rem;
  font-weight: 700;
}

.shortcuts-modal__panel {
  width: min(520px, calc(100% - 20px));
}

.shortcuts-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shortcut-group h3 {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-header);
}

.shortcut-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
}

.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shortcut-keys span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 1px 0 #cbd5e1;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.shortcut-desc {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.date-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
}

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

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

.date-picker__panel {
  position: relative;
  width: min(360px, calc(100% - 24px));
  margin: 12vh auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

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

.date-picker__head h2 {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.date-picker__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.date-picker__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.date-picker__close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.date-picker__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 6px;
}

.date-picker__toolbar strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--teal-header);
}

.date-picker__nav {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.date-picker__nav svg {
  width: 18px;
  height: 18px;
  display: block;
}

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

.date-picker__weekdays span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--muted);
  padding: 4px 0;
}

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

.date-picker__day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.date-picker__day--empty {
  visibility: hidden;
  pointer-events: none;
}

.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__day:active {
  transform: scale(0.96);
}

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

.date-picker__today {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #ecfdf5;
  color: var(--teal-header);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}
