/* Jalali Datepicker Styles */
.jdp-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}
.jdp-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  font-size: 12.5px;
  direction: ltr;
  text-align: right;
  box-sizing: border-box;
  transition: all .15s ease;
}
.jdp-input:focus {
  border-color: var(--accent, #1f4e79);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}
.jdp-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
}

/* Quick presets bar */
.date-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  width: 100%;
}
.date-preset-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s ease;
  font-family: inherit;
}
.date-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}
.date-preset-btn.active {
  background: var(--accent, #1f4e79);
  color: #ffffff;
  border-color: var(--accent, #1f4e79);
}

/* Popup calendar */
.jdp-popup {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 1050;
  width: 255px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 12px;
  font-family: inherit;
  direction: rtl;
  user-select: none;
  display: none;
  animation: jdpFadeIn .12s ease-out;
}
.jdp-popup.show {
  display: block;
}
@keyframes jdpFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.jdp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.jdp-nav-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  transition: all .12s;
}
.jdp-nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.jdp-title-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}
.jdp-select {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 4px;
  font-family: inherit;
  cursor: pointer;
}
.jdp-select:focus {
  outline: none;
  border-color: var(--accent, #1f4e79);
}

.jdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  margin-bottom: 6px;
}
.jdp-weekday {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 3px 0;
}
.jdp-weekday.weekend {
  color: #ef4444;
}

.jdp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.jdp-day {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: #1e293b;
  transition: all .1s;
  background: transparent;
  border: none;
}
.jdp-day:hover {
  background: #f1f5f9;
}
.jdp-day.empty {
  cursor: default;
  pointer-events: none;
}
.jdp-day.today {
  border: 1px solid var(--accent, #1f4e79);
  color: var(--accent, #1f4e79);
  font-weight: 700;
}
.jdp-day.selected {
  background: var(--accent, #1f4e79) !important;
  color: #ffffff !important;
  font-weight: 700;
}
.jdp-day.weekend {
  color: #dc2626;
}
.jdp-day.selected.weekend {
  color: #ffffff;
}

.jdp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.jdp-foot-btn {
  background: none;
  border: none;
  color: var(--accent, #1f4e79);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.jdp-foot-btn:hover {
  background: #f1f5f9;
}
.jdp-foot-btn.danger {
  color: #dc2626;
}
